#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include "machine.h"
#include "bu.h"
Include dependency graph for semaphore.c:
Go to the source code of this file.
Defines | |
#define | BU_SEMAPHORE_MAGIC 0x62757365 |
Functions | |
void | bu_semaphore_init (unsigned int nsemaphores) |
void | bu_semaphore_acquire (unsigned int i) |
void | bu_semaphore_release (unsigned int i) |
Machine-specific routines for parallel processing. Primarily for handling semaphores for critical sections.
The new paradigm: semaphores are referred to, not by a pointer, but by a small integer. This module is now responsible for obtaining whatever storage is needed to implement each semaphore.
Note that these routines can't use bu_log() for error logging, because bu_log() accquires semaphore #0 (BU_SEM_SYSCALL).
For code conversion hints, see "h/compat4.h"
Definition in file semaphore.c.