©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

Go to the documentation of this file.
00001 /*
00002     Simple Semaphore Interface
00003     AUP2, Sec. 7.09.2, 7.10.1
00004 
00005     Copyright 2003 by Marc J. Rochkind. All rights reserved.
00006     May be copied only for purposes and under conditions described
00007     on the Web page www.basepath.com/aup/copyright.htm.
00008 
00009     The Example Files are provided "as is," without any warranty;
00010     without even the implied warranty of merchantability or fitness
00011     for a particular purpose. The author and his publisher are not
00012     responsible for any damages, direct or incidental, resulting
00013     from the use or non-use of these Example Files.
00014 
00015     The Example Files may contain defects, and some contain deliberate
00016     coding mistakes that were included for educational reasons.
00017     You are responsible for determining if and how the Example Files
00018     are to be used.
00019 
00020 */
00021 #ifndef _SIMPLESEM_H_
00022 #define _SIMPLESEM_H_
00023 
00024 struct SimpleSem {
00025     union {
00026         int sm_semid;
00027         void *sm_sem;
00028     } sm;
00029 };
00030 
00031 struct SimpleSem *SimpleSemOpen(const char *name);
00032 bool SimpleSemClose(struct SimpleSem *sem);
00033 bool SimpleSemPost(struct SimpleSem *sem);
00034 bool SimpleSemWait(struct SimpleSem *sem);
00035 bool SimpleSemRemove(const char *name);
00036 
00037 #endif /* _SIMPLESEM_H_ */

Generated on Fri Apr 23 10:56:59 2004 for AUP2 Example Source by doxygen 1.3.1