ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dce-pthread-mutex.cc File Reference
#include "dce-pthread.h"
#include "utils.h"
#include "process.h"
#include "dce-manager.h"
#include "ns3/assert.h"
#include "ns3/log.h"
#include <stdint.h>
#include <errno.h>
+ Include dependency graph for dce-pthread-mutex.cc:

Go to the source code of this file.

Classes

struct  PthreadMutexAttr

Functions

int dce_pthread_mutex_destroy (pthread_mutex_t *mutex)
int dce_pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attribute)
int dce_pthread_mutex_lock (pthread_mutex_t *mutex)
int dce_pthread_mutex_trylock (pthread_mutex_t *mutex)
int dce_pthread_mutex_unlock (pthread_mutex_t *mutex)
int dce_pthread_mutexattr_destroy (pthread_mutexattr_t *attribute)
int dce_pthread_mutexattr_init (pthread_mutexattr_t *attribute)
int dce_pthread_mutexattr_settype (pthread_mutexattr_t *attribute, int kind)
static void MidToMutex (uint32_t mid, pthread_mutex_t *mutex)
static uint32_t MutexToMid (const pthread_mutex_t *mutex)
 NS_LOG_COMPONENT_DEFINE ("PthreadMutex")
static void PthreadMutexInitStatic (pthread_mutex_t *mutex)
static struct MutexSearchMutex (pthread_mutex_t *mutex)

Function Documentation

int dce_pthread_mutex_destroy ( pthread_mutex_t *  mutex)
int dce_pthread_mutex_init ( pthread_mutex_t *  mutex,
const pthread_mutexattr_t *  attribute 
)
int dce_pthread_mutex_lock ( pthread_mutex_t *  mutex)
int dce_pthread_mutex_trylock ( pthread_mutex_t *  mutex)
int dce_pthread_mutex_unlock ( pthread_mutex_t *  mutex)
int dce_pthread_mutexattr_destroy ( pthread_mutexattr_t *  attribute)

Definition at line 315 of file dce-pthread-mutex.cc.

References ns3::Current(), and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

int dce_pthread_mutexattr_init ( pthread_mutexattr_t *  attribute)

Definition at line 302 of file dce-pthread-mutex.cc.

References ns3::Current(), PthreadMutexAttr::type, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

int dce_pthread_mutexattr_settype ( pthread_mutexattr_t *  attribute,
int  kind 
)

Definition at line 325 of file dce-pthread-mutex.cc.

References ns3::Current(), PthreadMutexAttr::type, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

static void MidToMutex ( uint32_t  mid,
pthread_mutex_t *  mutex 
)
static

Definition at line 31 of file dce-pthread-mutex.cc.

Referenced by dce_pthread_mutex_destroy(), dce_pthread_mutex_init(), and PthreadMutexInitStatic().

+ Here is the caller graph for this function:

static uint32_t MutexToMid ( const pthread_mutex_t *  mutex)
static

Definition at line 20 of file dce-pthread-mutex.cc.

Referenced by SearchMutex().

+ Here is the caller graph for this function:

NS_LOG_COMPONENT_DEFINE ( "PthreadMutex"  )
static void PthreadMutexInitStatic ( pthread_mutex_t *  mutex)
static

Definition at line 38 of file dce-pthread-mutex.cc.

References ns3::Mutex::count, ns3::Mutex::current, ns3::Current(), ns3::Mutex::mid, MidToMutex(), ns3::Process::mutexes, ns3::Process::nextMid, ns3::Mutex::NORMAL, ns3::Thread::process, ns3::Mutex::RECURSIVE, ns3::Mutex::type, and ns3::Mutex::waiting.

Referenced by SearchMutex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct Mutex* SearchMutex ( pthread_mutex_t *  mutex)
staticread

Definition at line 66 of file dce-pthread-mutex.cc.

References ns3::Current(), ns3::Mutex::mid, ns3::Process::mutexes, MutexToMid(), ns3::Thread::process, and PthreadMutexInitStatic().

Referenced by dce_pthread_mutex_destroy(), dce_pthread_mutex_lock(), dce_pthread_mutex_trylock(), and dce_pthread_mutex_unlock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: