-const char trbnet_version[] = "$Revision: 2.67 $";
+const char trbnet_version[] = "$Revision: 2.68 $";
#include <stdlib.h>
#include <signal.h>
SEM_UNDO /* sem_flg: remove lock if process gets killed */
};
- if ((master_lock == 1) && (masterLock == 0)) return 0;
+ if ((master_lock == 1) && (masterLock == 0)) {
+ return 0;
+ }
/* Wait for semaphore and lock it */
if (semop(semid, &sops, 1) == -1) {
fifoToggleBit = readPC() & FIFO_TOGGLE_BIT;
if (masterLock != 0) master_lock = 1;
-
+
return 0;
}
1, /* sem_op: decrement semaphore, i.e. unlock it */
SEM_UNDO /* */
};
-
- if ((master_lock == 1) && (masterLock == 0)) return 0;
+
+ if ((master_lock == 1) && (masterLock == 0)) {
+ return 0;
+ }
/* Release semaphore */
if (semop(semid, &sops, 1) == -1) {