Jan Albiez ([EMAIL PROTECTED]) wrote:
> Hoi !
>
> Is there any chance to find out wether a task is suspended with
> pthread_suspend_np ?
>
> My problem is, that I have a queue emptying thread, which sould be suspend
> itself when the queue is empty, and started again for a periodic time until
> the queue ist empty again. The startup should be done from outside the task.
You can use semaphores.
To suspend itself, the thread should
sem_wait(&sem)
To wake the thread up, use sem_post(&sem);
Michael.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/