Semaphore: Difference between revisions
Content added Content deleted
m (→C (pthread)) |
m (→C) |
||
Line 55: | Line 55: | ||
==[[C]]== |
==[[C]]== |
||
{{libheader|pthread}} |
|||
Here is an example of counting semaphores in C, using the "pthread" library. To make the code more readable, no error checks are made. A productive version of this implementation should check all the return values from the various function calls! |
Here is an example of counting semaphores in C, using the "pthread" library. To make the code more readable, no error checks are made. A productive version of this implementation should check all the return values from the various function calls! |
||