[SOLVED] CS #ifndef SEMAPHORE_H

$25

File Name: CS_#ifndef_SEMAPHORE_H.zip
File Size: 207.24 KB

5/5 - (1 vote)

#ifndef SEMAPHORE_H
#define SEMAPHORE_H

#include #include

/* Semaphore */
struct semaphore {
unsigned value; /* Current value */
struct list waiters; /* List of waiting threads */
struct list_elem elem; /* condvar waiters list elem*/
};

void semaphore_init(struct semaphore *, unsigned value);
void semaphore_down(struct semaphore *);
bool semaphore_try_down(struct semaphore *);
void semaphore_up(struct semaphore *);
void semaphore_self_test(void);

#endif /* UCSC CSE130 */

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS #ifndef SEMAPHORE_H
$25