semaphore.c File Reference

semaphore implementation More...

#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)


Detailed Description

semaphore implementation

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"

Author:
Michael John Muuss
Source -
The U. S. Army Research Laboratory
Aberdeen Proving Ground, Maryland 21005-5068 USA

Definition in file semaphore.c.


Generated on Mon Sep 18 01:25:04 2006 for BRL-CAD by  doxygen 1.4.6