Jump to content

Metered concurrency: Difference between revisions

m
(→‎{{header|C}}: using actual semaphore)
m (→‎{{header|C}}: comment)
Line 131:
int count = 3;
 
/* the whole point of a semaphore is that you don't count it:
* p/v are atomic. Unless it's locked while you are doing
* something with the count, the value is only informative */
#define getcount() count
void acquire()
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.