2022-04-04 18:39:30 +00:00
|
|
|
#define N 8
|
|
|
|
// Shared memory through global variables
|
|
|
|
// Create all of memory
|
|
|
|
extern block memory[N];
|
|
|
|
// create the three lists
|
|
|
|
extern list lists[3];
|
2022-04-05 01:12:40 +00:00
|
|
|
extern list *freelist, *list1, *list2;
|
|
|
|
|
|
|
|
// count semaphores
|
|
|
|
extern sem_t semfl, seml1, seml2;
|
|
|
|
// binary semaphores
|
|
|
|
extern sem_t mutfl, mutl1, mutl2;
|