On Sun, May 08, 2005 at 12:00:26PM +0200, Jens M Andreasen wrote:
Can't you use:
void pthread_cleanup_push(void (*routine) (void *), void *arg);
void pthread_cleanup_pop(int execute);
Does the thread still exist as a thread when routine() is called, or more
specific, is routine() called from the thread's own context ? This is not clear
from the man page - routine() could be called from a different thread than
the one that is being cancelled.
But this is besides the point. In my original problem it is not the intention
to terminate the thread - just to force the snd_seq_event_input() to return.
The thread could well close the handle, open a new one and continue normal
operation. The simplest solution is probably to send some fake event to the
midi port.
--
FA