#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>
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 Mutex * | SearchMutex (pthread_mutex_t *mutex) |
int dce_pthread_mutex_destroy | ( | pthread_mutex_t * | mutex | ) |
Definition at line 137 of file dce-pthread-mutex.cc.
References ns3::Mutex::count, ns3::Mutex::current, ns3::Current(), MidToMutex(), ns3::Process::mutexes, ns3::Thread::process, SearchMutex(), ns3::UtilsGetNodeId(), and ns3::Mutex::waiting.
int dce_pthread_mutex_init | ( | pthread_mutex_t * | mutex, |
const pthread_mutexattr_t * | attribute | ||
) |
Definition at line 90 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, PthreadMutexAttr::type, ns3::Mutex::type, ns3::UtilsGetNodeId(), and ns3::Mutex::waiting.
int dce_pthread_mutex_lock | ( | pthread_mutex_t * | mutex | ) |
Definition at line 173 of file dce-pthread-mutex.cc.
References ns3::Mutex::count, ns3::Mutex::current, ns3::Current(), ns3::Process::manager, ns3::Mutex::NORMAL, ns3::Thread::process, ns3::Mutex::RECURSIVE, SearchMutex(), ns3::Mutex::type, ns3::UtilsGetNodeId(), ns3::DceManager::Wait(), and ns3::Mutex::waiting.
Referenced by dce_pthread_cond_timedwait(), and dce_pthread_cond_wait().
int dce_pthread_mutex_trylock | ( | pthread_mutex_t * | mutex | ) |
Definition at line 211 of file dce-pthread-mutex.cc.
References ns3::Mutex::count, ns3::Mutex::current, ns3::Current(), ns3::Mutex::NORMAL, ns3::Mutex::RECURSIVE, SearchMutex(), ns3::Mutex::type, and ns3::UtilsGetNodeId().
int dce_pthread_mutex_unlock | ( | pthread_mutex_t * | mutex | ) |
Definition at line 261 of file dce-pthread-mutex.cc.
References ns3::Mutex::count, ns3::Mutex::current, ns3::Current(), ns3::Process::manager, ns3::Thread::process, SearchMutex(), ns3::UtilsGetNodeId(), ns3::Mutex::waiting, ns3::DceManager::Wakeup(), and ns3::DceManager::Yield().
Referenced by dce_pthread_cond_timedwait(), and dce_pthread_cond_wait().
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().
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().
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().
|
static |
Definition at line 31 of file dce-pthread-mutex.cc.
Referenced by dce_pthread_mutex_destroy(), dce_pthread_mutex_init(), and PthreadMutexInitStatic().
|
static |
Definition at line 20 of file dce-pthread-mutex.cc.
Referenced by SearchMutex().
NS_LOG_COMPONENT_DEFINE | ( | "PthreadMutex" | ) |
|
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().
|
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().