Multitasking how to make worker thread gain control after calling infinite loop function

Posted by user353573 on Stack Overflow See other posts from Stack Overflow or by user353573
Published on 2010-06-06T08:02:39Z Indexed on 2010/06/06 8:12 UTC
Read the original article Hit count: 178

Filed under:

assume creating 3 worker threads by pthread_create,

in these worker thread routine, each call a simple infinite loop function which do not have a return to do counting

how to make worker thread gain control after calling infinite loop function and save the context of infinite loop function for calling in worker thread again?

© Stack Overflow or respective owner

Related posts about multithreading