ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dce-pthread.cc File Reference
#include "dce-pthread.h"
#include "dce-signal.h"
#include "dce-unistd.h"
#include "dce-manager.h"
#include "process.h"
#include "utils.h"
#include "dce-cxa.h"
#include "dce-stdio.h"
#include "loader-factory.h"
#include "task-manager.h"
#include "kingsley-alloc.h"
#include "ns3/log.h"
#include "ns3/simulator.h"
#include <errno.h>
#include <signal.h>
#include <list>
+ Include dependency graph for dce-pthread.cc:

Go to the source code of this file.

Classes

struct  PthreadStartContext

Functions

static void CleanupPthreadKeys (void)
void dce_exit (int status)
int dce_pthread_cancel (pthread_t thread)
int dce_pthread_create (pthread_t *thread_handle, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
int dce_pthread_detach (pthread_t thread_handle)
void dce_pthread_exit (void *arg)
void * dce_pthread_getspecific (pthread_key_t key)
int dce_pthread_join (pthread_t thread_handle, void **value_ptr)
int dce_pthread_key_create (pthread_key_t *key, void(*destructor)(void *))
int dce_pthread_key_delete (pthread_key_t key)
int dce_pthread_kill (pthread_t th, int sig)
int dce_pthread_once (pthread_once_t *once_control, void(*init_routine)(void))
pthread_t dce_pthread_self (void)
int dce_pthread_setspecific (pthread_key_t key, const void *value)
static bool IsKeyValid (pthread_key_t key)
 NS_LOG_COMPONENT_DEFINE ("SimuPthread")
static pthread_t PidTidToPthread (uint16_t pid, uint16_t tid)
static void pthread_do_start (void *context)
static void PthreadTaskSwitch (enum Task::SwitchType type, void *context)
static uint16_t PthreadToPid (pthread_t thread_handle)
static uint16_t PthreadToTid (pthread_t thread_handle)

Function Documentation

static void CleanupPthreadKeys ( void  )
static

Definition at line 47 of file dce-pthread.cc.

References ns3::Current(), and ns3::Thread::keyValues.

Referenced by dce_exit(), and dce_pthread_exit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dce_pthread_cancel ( pthread_t  thread)

Definition at line 247 of file dce-pthread.cc.

int dce_pthread_detach ( pthread_t  thread_handle)
void* dce_pthread_getspecific ( pthread_key_t  key)

Definition at line 291 of file dce-pthread.cc.

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

+ Here is the call graph for this function:

int dce_pthread_key_create ( pthread_key_t *  key,
void(*)(void *)  destructor 
)
int dce_pthread_key_delete ( pthread_key_t  key)

Definition at line 353 of file dce-pthread.cc.

References ns3::Current(), IsKeyValid(), ns3::Thread::keyValues, ns3::Thread::process, ns3::Process::threads, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

int dce_pthread_once ( pthread_once_t *  once_control,
void(*)(void)  init_routine 
)

Definition at line 260 of file dce-pthread.cc.

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

+ Here is the call graph for this function:

pthread_t dce_pthread_self ( void  )

Definition at line 252 of file dce-pthread.cc.

References ns3::Current(), ns3::Process::pid, PidTidToPthread(), ns3::Thread::process, ns3::Thread::tid, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

int dce_pthread_setspecific ( pthread_key_t  key,
const void *  value 
)

Definition at line 306 of file dce-pthread.cc.

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

+ Here is the call graph for this function:

static bool IsKeyValid ( pthread_key_t  key)
static

Definition at line 278 of file dce-pthread.cc.

References ns3::Current(), and ns3::Thread::keyValues.

Referenced by dce_pthread_key_create(), and dce_pthread_key_delete().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

NS_LOG_COMPONENT_DEFINE ( "SimuPthread"  )
static pthread_t PidTidToPthread ( uint16_t  pid,
uint16_t  tid 
)
static

Definition at line 37 of file dce-pthread.cc.

Referenced by dce_pthread_create(), and dce_pthread_self().

+ Here is the caller graph for this function:

static void pthread_do_start ( void *  context)
static

Definition at line 103 of file dce-pthread.cc.

References PthreadStartContext::arg, dce_pthread_exit(), and PthreadStartContext::start_routine.

Referenced by dce_pthread_create().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void PthreadTaskSwitch ( enum Task::SwitchType  type,
void *  context 
)
static

Definition at line 112 of file dce-pthread.cc.

References ns3::Process::alloc, ns3::Task::FROM, ns3::Process::loader, ns3::Loader::NotifyEndExecute(), ns3::Loader::NotifyStartExecute(), KingsleyAlloc::SwitchTo(), and ns3::Task::TO.

Referenced by dce_pthread_create().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint16_t PthreadToPid ( pthread_t  thread_handle)
static

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

Referenced by dce_pthread_detach(), dce_pthread_join(), and dce_pthread_kill().

+ Here is the caller graph for this function:

static uint16_t PthreadToTid ( pthread_t  thread_handle)
static

Definition at line 23 of file dce-pthread.cc.

Referenced by dce_pthread_detach(), dce_pthread_join(), and dce_pthread_kill().

+ Here is the caller graph for this function: