ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dce-semaphore.cc File Reference
#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 SemaphoreSearchSemaphore (const sem_t *sem)
static uint32_t SemToSid (const sem_t *sem)
static void SidToSem (uint32_t sid, sem_t *sem)

Function Documentation

static uint32_t AllocateSid ( struct Process process)
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)
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 
)
int dce_sem_timedwait ( sem_t *  sem,
const struct timespec *  abs_timeout 
)
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)
NS_LOG_COMPONENT_DEFINE ( "Semaphore"  )
static struct Semaphore* SearchSemaphore ( const sem_t *  sem)
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 uint32_t SemToSid ( const sem_t *  sem)
static

Definition at line 30 of file dce-semaphore.cc.

Referenced by SearchSemaphore().

+ Here is the caller graph for this function:

static void SidToSem ( uint32_t  sid,
sem_t *  sem 
)
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: