2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

c7/SimpleSem.h File Reference


Detailed Description

Simple Semaphore Interface [Sec. 7.9.2, 7.10.1].

Definition in file SimpleSem.h.

Go to the source code of this file.

Compounds

struct  SimpleSem

Functions

SimpleSem * SimpleSemOpen (const char *name)
bool SimpleSemClose (struct SimpleSem *sem)
bool SimpleSemPost (struct SimpleSem *sem)
bool SimpleSemWait (struct SimpleSem *sem)
bool SimpleSemRemove (const char *name)


Function Documentation

bool SimpleSemClose struct SimpleSem sem  ) 
 

Definition at line 70 of file SimpleSemPOSIX.c.

Referenced by main(), process1(), and process2().

struct SimpleSem* SimpleSemOpen const char *  name  ) 
 

Definition at line 34 of file SimpleSemPOSIX.c.

References close(), EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_neg1, ec_null, errno, ftok(), open(), PERM_FILE, sembuf::sem_flg, sembuf::sem_num, sembuf::sem_op, semid_ds::sem_otime, semctl(), semget(), semop(), SimpleSemOpen(), sleep(), SimpleSem::sm, and val.

Referenced by main(), process1(), process2(), and SimpleSemOpen().

bool SimpleSemPost struct SimpleSem sem  ) 
 

Definition at line 50 of file SimpleSemPOSIX.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, sembuf::sem_flg, sembuf::sem_num, sembuf::sem_op, semop(), and SimpleSem::sm.

Referenced by main(), process1(), process2(), and store().

bool SimpleSemRemove const char *  name  ) 
 

Definition at line 81 of file SimpleSemPOSIX.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_neg1, errno, ftok(), PERM_FILE, semctl(), and semget().

Referenced by main().

bool SimpleSemWait struct SimpleSem sem  ) 
 

Definition at line 60 of file SimpleSemPOSIX.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, sembuf::sem_flg, sembuf::sem_num, sembuf::sem_op, semop(), and SimpleSem::sm.

Referenced by main(), process2(), and store().


Generated on Fri Apr 23 10:57:09 2004 for AUP2 Example Source by doxygen 1.3.1