Everywhere i look i can't find the default implementation of pthread_suspend in POSIX.
It seems many pthread.h implementations have pthread_suspend() but not the opengroup.org one (which is used by linux), so i'm holding back untill i get some confirmations.
I want to know since one of my Win32 API functions runs a thread that recursively reads files from the harddisk. A dialog has 2 buttons: Cancel and Pause.
By clicking [Pause] it suspends the thread and waits till the user wants to continue or cancels.
Win32 has functions for this but i can't find it in pthread.
Someone has a clue or should i wrap around my own variable like
PHP Code:
while (!suspended) {
}
or a mutex
PHP Code:
pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);