Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonathan Wilkes
flext
Commits
c8f84597
Commit
c8f84597
authored
Jun 05, 2003
by
thomas
Browse files
no message
git-svn-id:
https://svn.grrrr.org/ext/trunk@627
4d9ac71a-51e6-0310-8455-cad1006bcd31
parent
1d321666
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/flqueue.cpp
View file @
c8f84597
...
...
@@ -12,6 +12,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief Implementation of the flext message queuing functionality.
\todo Let's see if queuing can be implemented for Max/MSP with defer_low
if FLEXT_PDLOCK is defined, the new PD thread lock functions are used
*/
#include "flext.h"
...
...
@@ -67,7 +69,7 @@ void flext_base::QTick(flext_base *th)
{
#endif
// post("qtick");
#if defined(FLEXT_THREADS) && defined(FLEXT_DEBUG)
#if defined(FLEXT_THREADS) && defined(FLEXT_DEBUG)
&& !defined(FLEXT_PDLOCK)
if
(
!
th
->
IsSystemThread
())
{
error
(
"flext - Queue tick called by wrong thread!"
);
return
;
...
...
@@ -76,6 +78,9 @@ void flext_base::QTick(flext_base *th)
#ifdef FLEXT_THREADS
th
->
qmutex
.
Lock
();
#endif
#ifdef FLEXT_PDLOCK
pd_lock
();
#endif
for
(;;)
{
qmsg
*
m
=
th
->
qhead
;
...
...
@@ -140,6 +145,9 @@ void flext_base::QTick(flext_base *th)
m
->
nxt
=
NULL
;
delete
m
;
}
#ifdef FLEXT_PDLOCK
pd_unlock
();
#endif
#ifdef FLEXT_THREADS
th
->
qmutex
.
Unlock
();
#endif
...
...
@@ -160,7 +168,13 @@ void flext_base::Queue(qmsg *m)
#endif
#if FLEXT_SYS == FLEXT_SYS_PD
clock_delay
(
qclk
,
0
);
#ifdef FLEXT_PDLOCK
// wake up a worker thread
// (instead of triggering the clock)
clock_delay
(
qclk
,
0
);
#else
clock_delay
(
qclk
,
0
);
#endif
#elif FLEXT_SYS == FLEXT_SYS_MAX
qelem_set
(
qclk
);
#elif FLEXT_SYS == FLEXT_SYS_JMAX
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment