/home/dko/projects/mobilec/trunk/src/mc_sync/sync_list.c File Reference

#include <pthread.h>
#include "sync_list.h"
#include "../mc_list/list.h"
#include "../include/mc_error.h"

Go to the source code of this file.

Functions

int syncListNodeInit (struct syncListNode_s *node)
struct syncListNode_ssyncListNodeNew (void)
int syncListNodeDestroy (struct syncListNode_s *node)
syncListNode_tsyncListFind (int id, struct syncList_s *list)
struct syncList_ssyncListInit (void)
int syncListAddNode (struct syncListNode_s *node, struct syncList_s *list)
int syncListNew (int id, struct syncList_s *list)
int syncListDelete (int id, struct syncList_s *list)
syncListNode_tsyncListRemove (int id, struct syncList_s *list)


Function Documentation

int syncListAddNode ( struct syncListNode_s node,
struct syncList_s list 
)

Definition at line 83 of file sync_list.c.

References DATA, syncListNode_s::id, syncList_s::list, ListAdd(), list_s::listhead, syncList_s::lock, listNode_s::next, listNode_s::node_data, RWLOCK_WRLOCK, and RWLOCK_WRUNLOCK.

Referenced by MC_SyncInit(), and syncListNew().

int syncListDelete ( int  id,
struct syncList_s list 
)

Definition at line 112 of file sync_list.c.

References syncListNode_s::id, syncList_s::list, ListDelete(), ListSearch(), syncList_s::lock, MC_ERR_NOT_FOUND, RWLOCK_WRLOCK, RWLOCK_WRUNLOCK, list_s::size, and syncListNodeDestroy().

syncListNode_t* syncListFind ( int  id,
struct syncList_s list 
)

Definition at line 53 of file sync_list.c.

References syncList_s::list, list_s::listhead, syncList_s::lock, listNode_s::next, listNode_s::node_data, RWLOCK_RDLOCK, and RWLOCK_RDUNLOCK.

Referenced by MC_CondBroadcast(), MC_CondReset(), MC_CondSignal(), MC_CondWait(), MC_MutexLock(), MC_MutexUnlock(), MC_SemaphorePost(), MC_SemaphoreWait(), MC_SyncDelete(), and MC_SyncInit().

struct syncList_s* syncListInit ( void   )  [read]

Definition at line 69 of file sync_list.c.

References ListInitialize(), syncList_s::lock, MUTEX_INIT, MUTEX_T, RWLOCK_INIT, and RWLOCK_T.

Referenced by mc_platform_Initialize().

int syncListNew ( int  id,
struct syncList_s list 
)

Definition at line 102 of file sync_list.c.

References node, syncListAddNode(), and syncListNodeInit().

int syncListNodeDestroy ( struct syncListNode_s node  ) 

Definition at line 41 of file sync_list.c.

References syncListNode_s::cond, COND_DESTROY, syncListNode_s::lock, MUTEX_DESTROY, syncListNode_s::sem, and SEMAPHORE_DESTROY.

Referenced by MC_SyncDelete(), and syncListDelete().

int syncListNodeInit ( struct syncListNode_s node  ) 

Definition at line 8 of file sync_list.c.

References CHECK_NULL, syncListNode_s::cond, COND_INIT, COND_T, syncListNode_s::lock, MUTEX_INIT, MUTEX_T, syncListNode_s::sem, SEMAPHORE_INIT, and SEMAPHORE_T.

Referenced by syncListNew().

struct syncListNode_s* syncListNodeNew ( void   )  [read]

Definition at line 23 of file sync_list.c.

References CHECK_NULL, syncListNode_s::cond, COND_INIT, COND_T, syncListNode_s::lock, MUTEX_INIT, MUTEX_T, syncListNode_s::sem, SEMAPHORE_INIT, SEMAPHORE_T, and syncListNode_s::signalled.

Referenced by MC_SyncInit().

syncListNode_t* syncListRemove ( int  id,
struct syncList_s list 
)

Definition at line 129 of file sync_list.c.

References syncListNode_s::id, syncList_s::list, ListDelete(), ListSearch(), syncList_s::lock, RWLOCK_WRLOCK, RWLOCK_WRUNLOCK, and list_s::size.

Referenced by MC_SyncDelete().


Generated on Fri May 16 14:49:56 2008 for Mobile-C by  doxygen 1.5.4