Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

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