#include "dce-semaphore.h"#include "process.h"#include "dce-manager.h"#include "utils.h"#include <stdint.h>#include <errno.h>#include "ns3/log.h"#include "ns3/assert.h"#include "ns3/fatal-error.h"#include "ns3/simulator.h"
Include dependency graph for dce-semaphore.cc:Go to the source code of this file.
Functions | |
| static uint32_t | AllocateSid (struct Process *process) |
| int | dce_sem_destroy (sem_t *sem) |
| int | dce_sem_getvalue (sem_t *sem, int *sval) |
| int | dce_sem_init (sem_t *sem, int pshared, unsigned int value) |
| int | dce_sem_post (sem_t *sem) |
| int | dce_sem_timedwait (sem_t *sem, const struct timespec *abs_timeout) |
| int | dce_sem_trywait (sem_t *sem) |
| int | dce_sem_wait (sem_t *sem) |
| NS_LOG_COMPONENT_DEFINE ("Semaphore") | |
| static struct Semaphore * | SearchSemaphore (const sem_t *sem) |
| static uint32_t | SemToSid (const sem_t *sem) |
| static void | SidToSem (uint32_t sid, sem_t *sem) |
|
static |
Definition at line 17 of file dce-semaphore.cc.
References ns3::Process::nextSid.
Referenced by dce_sem_init().
Here is the caller graph for this function:| int dce_sem_destroy | ( | sem_t * | sem | ) |
Definition at line 78 of file dce-semaphore.cc.
References ns3::Current(), ns3::Thread::err, ns3::Thread::process, SearchSemaphore(), ns3::Process::semaphores, SidToSem(), ns3::UtilsGetNodeId(), and ns3::Semaphore::waiting.
Here is the call graph for this function:| int dce_sem_getvalue | ( | sem_t * | sem, |
| int * | sval | ||
| ) |
Definition at line 218 of file dce-semaphore.cc.
References ns3::Semaphore::count, ns3::Current(), ns3::Thread::err, SearchSemaphore(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_sem_init | ( | sem_t * | sem, |
| int | pshared, | ||
| unsigned int | value | ||
| ) |
Definition at line 59 of file dce-semaphore.cc.
References AllocateSid(), ns3::Semaphore::count, ns3::Current(), ns3::Thread::err, ns3::Thread::process, ns3::Process::semaphores, ns3::Semaphore::sid, SidToSem(), and ns3::Semaphore::waiting.
Here is the call graph for this function:| int dce_sem_post | ( | sem_t * | sem | ) |
Definition at line 108 of file dce-semaphore.cc.
References ns3::Semaphore::count, ns3::Current(), ns3::Thread::err, ns3::Process::manager, ns3::Thread::process, SearchSemaphore(), ns3::UtilsGetNodeId(), ns3::Semaphore::waiting, ns3::DceManager::Wakeup(), and ns3::DceManager::Yield().
Here is the call graph for this function:| int dce_sem_timedwait | ( | sem_t * | sem, |
| const struct timespec * | abs_timeout | ||
| ) |
Definition at line 175 of file dce-semaphore.cc.
References ns3::Semaphore::count, ns3::Current(), ns3::Thread::err, ns3::Process::manager, ns3::Thread::process, SearchSemaphore(), ns3::UtilsGetNodeId(), ns3::UtilsTimespecToTime(), ns3::UtilsTimeToSimulationTime(), ns3::DceManager::Wait(), and ns3::Semaphore::waiting.
Here is the call graph for this function:| int dce_sem_trywait | ( | sem_t * | sem | ) |
Definition at line 155 of file dce-semaphore.cc.
References ns3::Semaphore::count, ns3::Current(), ns3::Thread::err, SearchSemaphore(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_sem_wait | ( | sem_t * | sem | ) |
Definition at line 134 of file dce-semaphore.cc.
References ns3::Semaphore::count, ns3::Current(), ns3::Thread::err, ns3::Process::manager, ns3::Thread::process, SearchSemaphore(), ns3::UtilsGetNodeId(), ns3::DceManager::Wait(), and ns3::Semaphore::waiting.
Here is the call graph for this function:| NS_LOG_COMPONENT_DEFINE | ( | "Semaphore" | ) |
|
staticread |
Definition at line 40 of file dce-semaphore.cc.
References ns3::Current(), ns3::Thread::process, ns3::Process::semaphores, SemToSid(), and ns3::Semaphore::sid.
Referenced by dce_sem_destroy(), dce_sem_getvalue(), dce_sem_post(), dce_sem_timedwait(), dce_sem_trywait(), and dce_sem_wait().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 30 of file dce-semaphore.cc.
Referenced by SearchSemaphore().
Here is the caller graph for this function:
|
static |
Definition at line 25 of file dce-semaphore.cc.
Referenced by dce_sem_destroy(), and dce_sem_init().
Here is the caller graph for this function: