PKUOS - Pintos
Pintos source browser for PKU Operating System course
Data Fields
semaphore Struct Reference

A counting semaphore. More...

#include <synch.h>

Collaboration diagram for semaphore:
Collaboration graph
[legend]

Data Fields

unsigned value
 Current value. More...
 
struct list waiters
 List of waiting threads. More...
 

Detailed Description

A counting semaphore.

Definition at line 8 of file synch.h.

Field Documentation

◆ value

unsigned semaphore::value

Current value.

Definition at line 10 of file synch.h.

Referenced by sema_down(), sema_init(), sema_try_down(), and sema_up().

◆ waiters

struct list semaphore::waiters

List of waiting threads.

Definition at line 11 of file synch.h.

Referenced by sema_down(), sema_init(), and sema_up().


The documentation for this struct was generated from the following file: