[SOLVED] CS代考计算机代写 #ifndef SEMAPHORE_H

30 $

File Name: CS代考计算机代写_#ifndef_SEMAPHORE_H.zip
File Size: 405.06 KB

SKU: 1294107140 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


#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
30 $