Chimera: chimera_0-9/include/semaphore.h Source File

- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# semaphore.h

Go to the documentation of this file.

    00001 /*
    00002 ** $Id: semaphore_8h-source.html,v 1.3 2006/05/02 21:30:03 krishnap Exp $
    00003 **
    00004 ** Matthew Allen
    00005 ** description:
    00006 */
    00007
    00008 #ifndef _CHIMERA_SEMAPHORE_H_
    00009 #define _CHIMERA_SEMAPHORE_H_
    00010
    00011 typedef struct {
    00012   int val;
    00013   pthread_mutex_t lock;
    00014   pthread_cond_t cond;
    00015 } Sema;
    00016
    00017 void *sema_create(int val);
    00018 void sema_destroy(void *v);
    00019 int sema_p(void *v, double timeout);
    00020 void sema_v(void *v);
    00021
    00022 #endif /* _CHIMERA_SEMAPHORE_H_ */