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/SimpleSemSysV.c File Reference


Detailed Description

Simple Semaphore Interface - System V implementation [Sec. 7.9.2].

Definition in file SimpleSemSysV.c.

Go to the source code of this file.

Functions

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


Function Documentation

bool SimpleSemClose struct SimpleSem sem  ) 
 

Definition at line 117 of file SimpleSemSysV.c.

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

struct SimpleSem* SimpleSemOpen const char *  name  ) 
 

Definition at line 25 of file SimpleSemSysV.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 87 of file SimpleSemSysV.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 123 of file SimpleSemSysV.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 102 of file SimpleSemSysV.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