#include "../include/macros.h"
#include "../mc_list/list.h"
#include "../include/mc_rwlock.h"
Go to the source code of this file.
Data Structures | |
struct | syncListNode_s |
struct | syncList_s |
Typedefs | |
typedef struct syncListNode_s | syncListNode_t |
typedef syncListNode_t * | syncListNode_p |
typedef struct syncList_s | syncList_t |
typedef syncList_t * | syncList_p |
Functions | |
int | syncListNodeInit (struct syncListNode_s *node) |
int | syncListNodeDestroy (struct syncListNode_s *node) |
syncListNode_t * | syncListFind (int id, struct syncList_s *list) |
struct syncListNode_s * | syncListNodeNew (void) |
int | syncListDelete (int id, struct syncList_s *list) |
syncListNode_t * | syncListRemove (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) |
syncListNode_t * | syncListGet (int id, struct syncList_s *list) |
typedef syncList_t* syncList_p |
Definition at line 33 of file sync_list.h.
typedef struct syncList_s syncList_t |
typedef syncListNode_t* syncListNode_p |
Definition at line 23 of file sync_list.h.
typedef struct syncListNode_s syncListNode_t |
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().
syncListNode_t* syncListGet | ( | int | id, | |
struct syncList_s * | list | |||
) |
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().