[PD-cvs] externals/grill/py/source main.cpp,1.21,1.22 main.h,1.28,1.29
Thomas Grill
xovo at users.sourceforge.net
Tue Feb 1 05:57:08 CET 2005
Update of /cvsroot/pure-data/externals/grill/py/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14259/source
Modified Files:
main.cpp main.h
Log Message:
fixes for single-threaded compilation
little restructuring
Index: main.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/main.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** main.cpp 11 Jan 2005 04:59:27 -0000 1.21
--- main.cpp 1 Feb 2005 04:57:06 -0000 1.22
***************
*** 159,164 ****
--- 159,166 ----
FLEXT_ADDTIMER(stoptmr,tick);
+ #ifdef FLEXT_THREADS
// launch thread worker
FLEXT_CALLMETHOD(threadworker);
+ #endif
}
***************
*** 166,169 ****
--- 168,173 ----
{
shouldexit = true;
+
+ #ifdef FLEXT_THREADS
qucond.Signal();
***************
*** 177,181 ****
post("%s - Okay, all threads have terminated",thisName());
}
!
PyThreadState *state = PyLock();
Py_XDECREF(module_obj);
--- 181,185 ----
post("%s - Okay, all threads have terminated",thisName());
}
! #endif
PyThreadState *state = PyLock();
Py_XDECREF(module_obj);
***************
*** 457,464 ****
--- 461,470 ----
Py_DECREF(pmeth);
break;
+ #ifdef FLEXT_THREADS
case 1:
// put call into queue
ret = qucall(pmeth,pargs);
break;
+ #endif
case 2:
// each call a new thread
***************
*** 492,495 ****
--- 498,502 ----
}
+ #ifdef FLEXT_THREADS
bool py::qucall(PyObject *fun,PyObject *args)
{
***************
*** 527,530 ****
--- 534,538 ----
PyUnlock(state);
}
+ #endif
#if FLEXT_SYS == FLEXT_SYS_MAX
Index: main.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/main.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** main.h 11 Jan 2005 04:59:27 -0000 1.28
--- main.h 1 Feb 2005 04:57:06 -0000 1.29
***************
*** 134,137 ****
--- 134,141 ----
private:
+
+ void work_wrapper(void *data);
+
+ #ifdef FLEXT_THREADS
bool qucall(PyObject *fun,PyObject *args);
void threadworker();
***************
*** 139,145 ****
ThrCond qucond;
- void work_wrapper(void *data);
-
- #ifdef FLEXT_THREADS
FLEXT_THREAD_X(work_wrapper)
#else
--- 143,146 ----
***************
*** 195,199 ****
--- 196,202 ----
FLEXT_CALLBACK_T(tick)
+ #ifdef FLEXT_THREADS
FLEXT_THREAD(threadworker)
+ #endif
};
More information about the Pd-cvs
mailing list