How to signal a buffer full state between posix threads

Posted by mikip on Stack Overflow See other posts from Stack Overflow or by mikip
Published on 2010-04-20T08:09:51Z Indexed on 2010/04/20 8:13 UTC
Read the original article Hit count: 262

Filed under:
|
|
|

Hi

I have two threads, the main thread 'A' is responsible for message handling between a number of processes. When thread A gets a buffer full message, it should inform thread B and pass a pointer to the buffer which thread B will then process.

When thread B has finished it should inform thread A that it has finished.

How do I go about implementing this using posix threads using C on linux. I have looked at conditional variables, is this the way to go? . I'm not experienced in multi threaded programming and would like some advice on the best avenue to take.

Thanks

© Stack Overflow or respective owner

Related posts about posix

Related posts about threads