#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_s * | syncListNodeNew (void) |
int | syncListNodeDestroy (struct syncListNode_s *node) |
syncListNode_t * | syncListFind (int id, struct syncList_s *list) |
struct syncList_s * | syncListInit (void) |
int | syncListDestroy (struct syncList_s *list) |
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_t * | syncListRemove (int id, struct syncList_s *list) |
int syncListAddNode | ( | struct syncListNode_s * | node, | |
struct syncList_s * | list | |||
) |
Definition at line 107 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 136 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().
int syncListDestroy | ( | struct syncList_s * | list | ) |
Definition at line 86 of file sync_list.c.
References syncList_s::giant_lock, syncList_s::list, ListDelete(), ListSearch(), ListTerminate(), syncList_s::lock, MUTEX_DESTROY, RWLOCK_DESTROY, RWLOCK_WRLOCK, RWLOCK_WRUNLOCK, list_s::size, and syncListNodeDestroy().
Referenced by mc_platform_Destroy().
syncListNode_t* syncListFind | ( | int | id, | |
struct syncList_s * | list | |||
) |
Definition at line 56 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 72 of file sync_list.c.
References syncList_s::giant_lock, syncList_s::list, 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 126 of file sync_list.c.
References node, syncListAddNode(), and syncListNodeInit().
int syncListNodeDestroy | ( | struct syncListNode_s * | node | ) |
Definition at line 44 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(), syncListDelete(), and syncListDestroy().
int syncListNodeInit | ( | struct syncListNode_s * | node | ) |
Definition at line 11 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 26 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 153 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().