/* ****************SPIN12.H******** Jonathan W. Valvano April 21, 1998 Spinlock binary semaphore, Spinlock counting semaphore, without disabling interrupts */ void bWait(char *); void bSignal(char *); struct sema4 // counting semaphore based on 3 binary semaphores { int value; // semaphore value char s1; // binary semaphore char s2; // binary semaphore char s3; // binary semaphore }; typedef struct sema4 sema4Type; typedef sema4Type * sema4Ptr; void Wait(sema4Ptr); void Signal(sema4Ptr); void Initialize(sema4Ptr,int);