00001 /* SVN FILE INFO 00002 * $Revision: 174 $ : Last Committed Revision 00003 * $Date: 2008-06-24 10:50:29 -0700 (Tue, 24 Jun 2008) $ : Last Committed Date */ 00004 /* CondList is a list of condition variables. Agents may set their own 00005 * condition variables, which other entities (agents, binary api) may signal. 00006 * */ 00007 00008 #ifndef _COND_LIST_H_ 00009 #define _COND_LIST_H_ 00010 #include "../include/macros.h" 00011 #include "../mc_list/list.h" 00012 #include "../include/mc_rwlock.h" 00013 00014 /* CondlistNode_t */ 00015 00016 typedef struct syncListNode_s { 00017 MUTEX_T *lock; 00018 COND_T *cond; 00019 SEMAPHORE_T *sem; 00020 int id; 00021 int signalled; 00022 }syncListNode_t; 00023 typedef syncListNode_t* syncListNode_p; 00024 00025 int syncListNodeInit(struct syncListNode_s *node); 00026 int syncListNodeDestroy(struct syncListNode_s *node); 00027 struct syncListNode_s* syncListNodeNew(void); 00028 00029 int syncListDelete(int id, list_t *list); 00030 syncListNode_t* syncListRemove(int id, list_t *list); 00031 int syncListAddNode(struct syncListNode_s *node, list_t *list); 00032 int syncListNew(int id, list_t *list); 00033 syncListNode_t* syncListGet(int id, list_t *list); 00034 00035 int syncListNode_CmpID(int* key, syncListNode_t* node); 00036 #endif