📚 The CoCalc Library - books, templates and other resources
1/* Example code for Think OS. 2 3Copyright 2015 Allen Downey 4License: Creative Commons Attribution-ShareAlike 3.0 5 6*/ 7 8typedef struct { 9 // put whatever you need here 10} Semaphore; 11 12Semaphore *make_semaphore(int value); 13void semaphore_wait(Semaphore *semaphore); 14void semaphore_signal(Semaphore *semaphore); 15 16