数据结构变化
struct Semaphore {
int state;
int value;
struct ListHead pcb; // link to all pcb ListHead blocked on this semaphore
};
typedef struct Semaphore Semaphore;
struct Device {
int state;
int value;
struct ListHead pcb; // link to all pcb ListHead blocked on this device
};
typedef struct Device Device;
Semaphore sem[MAX_SEM_NUM];
Device dev[MAX_DEV_NUM];Last updated