NNAAMMEE
init_monitor, mon_enter, mon_exit, mon_signal, mon_wait - monitor

SSYYNNOOPPSSIISS
#include "monitor.h"

extern int init_monitor(monitor_t *mon);
extern int mon_enter(monitor_t *mon);
extern int mon_exit(monitor_t *mon);
extern int mon_signal(monitor_t *mon, int cond);
extern int mon_wait(monitor_t *mon, int cond);

DDEESSCCRRIIPPTTIIOONN
A monitor is a synchronization mechanism  which  provides  struc-
tured access to a region.  When the mon_enter() function returns,
the process is said to be "in" the monitor.  There  can  only  be
one  process  "in"  the  monitor at a time.  A process leaves the
monitor via "mon_exit()".  While in the monitor,  a  process  may
choose  to  wait  for a condition to arise.  This is performed by
mon_wait().  When a process calls mon_wait, it leaves  the  moni-
tor,  and  only  re-enters it when the condition becomes true.  A
process can indicate a condition via mon_signal().

NNAAMMEE
init_rendezvous, rendezvous - exchange a word of data.

SSYYNNOOPPSSIISS
#include <rwlock.h>

int init_rendezvous(rendez *);
int rendezvous(rendez *, unsigned *);

DDEESSCCRRIIPPTTIIOONN
Rendezvous permits to processes to syncronize  and  exchange  one
word of data.  When rendezvous() is invoked, there are either one
or zero processes waiting.  If there isn't a process waiting, the
calling  process blocks on the rendezvous.  If there is a process
waiting, the calling process exchanges the word of data and  both
processes continue.
NNAAMMEE
init_rwlock,  read_lock,  read_unlock, write_lock, write_unlock -
reader-writer locks

SSYYNNOOPPSSIISS
#include <rwlock.h>

int init_rwlock(rwlock_t *);
int read_lock(volatile rwlock_t *);
int write_lock(volatile rwlock_t *);
int read_unlock(volatile rwlock_t *);
int write_unlock(volatile rwlock_t *);

DDEESSCCRRIIPPTTIIOONN
Reader-writer locks are a synchronization mechanism  which  allow
concurrent access by multiple readers or one writer, but excludes
concurrent access by multiple writers or readers and writers.
An attempt to acquire a write lock prevents subsequent read locks
until the write lock is released.  When a write lock is released,
all waiting readers are allowed to proceed,  even  if  there  are
waiting writers.






