aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flthr.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2002-12-04 08:50:45 +0000
committerThomas Grill <xovo@users.sourceforge.net>2002-12-04 08:50:45 +0000
commit695e307eb3107dc9d511ab27760ba46d6916b347 (patch)
tree83c8581d4824544d8954076a6d775b720100bcfd /externals/grill/flext/source/flthr.cpp
parentabdc387d7fabe5f18cc3cb448c15aa898f9fdaaa (diff)
""
svn path=/trunk/; revision=274
Diffstat (limited to 'externals/grill/flext/source/flthr.cpp')
-rw-r--r--externals/grill/flext/source/flthr.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/externals/grill/flext/source/flthr.cpp b/externals/grill/flext/source/flthr.cpp
index 705f1631..2a3ad3df 100644
--- a/externals/grill/flext/source/flthr.cpp
+++ b/externals/grill/flext/source/flthr.cpp
@@ -54,6 +54,8 @@ bool flext_base::StartThread(void *(*meth)(thr_params *p),thr_params *p,char *me
parm.sched_priority = prio-1;
pthread_setschedparam(id,policy,&parm);
}
+
+// post("Create thread");
pthread_t thrid;
int ret = pthread_create (&thrid,&attr,(void *(*)(void *))meth,p);
@@ -66,6 +68,8 @@ bool flext_base::StartThread(void *(*meth)(thr_params *p),thr_params *p,char *me
#ifdef _DEBUG
error((char *)(ret == EAGAIN?"%s - Unsufficient resources to launch thread!":"%s - Could not launch method!"),methname);
#endif
+ error((char *)("%s - Could not launch method!"),methname);
+
delete p;
return false;
}
@@ -73,6 +77,8 @@ bool flext_base::StartThread(void *(*meth)(thr_params *p),thr_params *p,char *me
#ifdef MAXMSP
sched_yield();
#endif
+// post("Create thread: OK");
+
return true;
}
}
@@ -81,6 +87,8 @@ bool flext_base::PushThread()
{
tlmutex.Lock();
+// post("Push thread");
+
// make an entry into thread list
thr_entry *nt = new thr_entry;
if(thrtail) thrtail->nxt = nt;
@@ -130,6 +138,8 @@ void flext_base::PopThread()
{
tlmutex.Lock();
+// post("Pop thread");
+
pthread_t id = pthread_self();
thr_entry *prv = NULL,*ti;