PPL Logo

conv-core/cpthreads.C File Reference

Go to the source code of this file.

Data Structures

struct  Cpthread_s
struct  Cpthread_key_s
struct  Cpthread_cleanup_s
struct  CmiMainFnArg_s

Typedefs

typedef void *(* voidfn )(void *)
typedef struct CmiMainFnArg_s CmiMainFnArg

Functions

int Cpthread_key_create (Cpthread_key_t *keyp, void(*destructo)(void *))
int Cpthread_key_delete (Cpthread_key_t key)
int Cpthread_setspecific (Cpthread_key_t key, void *val)
void * Cpthread_getspecific (Cpthread_key_t key)
void Cpthread_cleanup_push (void(*routine)(void *), void *arg)
void Cpthread_cleanup_pop (int execute)
int Cpthread_attr_init (Cpthread_attr_t *attr)
int Cpthread_attr_destroy (Cpthread_attr_t *attr)
int Cpthread_attr_getstacksize (Cpthread_attr_t *attr, size_t *size)
int Cpthread_attr_setstacksize (Cpthread_attr_t *attr, size_t size)
int Cpthread_attr_getdetachstate (Cpthread_attr_t *attr, int *state)
int Cpthread_attr_setdetachstate (Cpthread_attr_t *attr, int state)
void Cpthread_top (Cpthread_t pt)
int Cpthread_create (Cpthread_t *thread, Cpthread_attr_t *attr, voidfn fn, void *arg)
void Cpthread_exit (void *status)
int Cpthread_equal (Cpthread_t t1, Cpthread_t t2)
int Cpthread_detach (Cpthread_t pt)
int Cpthread_join (Cpthread_t pt, void **status)
int Cpthread_once (Cpthread_once_t *once, void(*fn)(void))
static void errspan (void)
int Cpthread_mutexattr_init (Cpthread_mutexattr_t *mattr)
int Cpthread_mutexattr_destroy (Cpthread_mutexattr_t *mattr)
int Cpthread_mutexattr_getpshared (Cpthread_mutexattr_t *mattr, int *pshared)
int Cpthread_mutexattr_setpshared (Cpthread_mutexattr_t *mattr, int pshared)
int Cpthread_mutex_init (Cpthread_mutex_t *mutex, Cpthread_mutexattr_t *mattr)
int Cpthread_mutex_destroy (Cpthread_mutex_t *mutex)
int Cpthread_mutex_lock (Cpthread_mutex_t *mutex)
int Cpthread_mutex_trylock (Cpthread_mutex_t *mutex)
int Cpthread_mutex_unlock (Cpthread_mutex_t *mutex)
int Cpthread_condattr_init (Cpthread_condattr_t *cattr)
int Cpthread_condattr_destroy (Cpthread_condattr_t *cattr)
int Cpthread_condattr_getpshared (Cpthread_condattr_t *cattr, int *pshared)
int Cpthread_condattr_setpshared (Cpthread_condattr_t *cattr, int pshared)
int Cpthread_cond_init (Cpthread_cond_t *cond, Cpthread_condattr_t *cattr)
int Cpthread_cond_destroy (Cpthread_cond_t *cond)
int Cpthread_cond_wait (Cpthread_cond_t *cond, Cpthread_mutex_t *mutex)
int Cpthread_cond_signal (Cpthread_cond_t *cond)
int Cpthread_cond_broadcast (Cpthread_cond_t *cond)
static void Cpthread_main_wrapper (CmiMainFnArg *arg)
int Cpthread_init (void)
void CpthreadModuleInit (void)
void Cpthread_start_main (CmiStartFn fn, int argc, char **argv)

Variables

Cpthread_key_t keys_active = 0
Cpthread_key_t keys_inactive = 0


Typedef Documentation

typedef void*(* voidfn)(void *)

Definition at line 55 of file cpthreads.C.

typedef struct CmiMainFnArg_s CmiMainFnArg


Function Documentation

int Cpthread_key_create ( Cpthread_key_t keyp,
void(*)(void *)  destructo 
)

Definition at line 98 of file cpthreads.C.

References CthRegister(), Cpthread_key_s::destructo, key, Cpthread_key_s::magic, malloc(), Cpthread_key_s::next, and Cpthread_key_s::offset.

Here is the call graph for this function:

int Cpthread_key_delete ( Cpthread_key_t  key  ) 

Definition at line 117 of file cpthreads.C.

References Cpthread_key_s::magic, and Cpthread_key_s::next.

int Cpthread_setspecific ( Cpthread_key_t  key,
void *  val 
)

Definition at line 140 of file cpthreads.C.

References data, Cpthread_key_s::magic, and Cpthread_key_s::offset.

void* Cpthread_getspecific ( Cpthread_key_t  key  ) 

Definition at line 149 of file cpthreads.C.

References data, Cpthread_key_s::magic, and Cpthread_key_s::offset.

void Cpthread_cleanup_push ( void(*)(void *)  routine,
void *  arg 
)

Definition at line 172 of file cpthreads.C.

References Cpthread_cleanup_s::argument, c, Cpthread_s::cleanups, malloc(), Cpthread_cleanup_s::next, and Cpthread_cleanup_s::routine.

Here is the call graph for this function:

void Cpthread_cleanup_pop ( int  execute  ) 

Definition at line 184 of file cpthreads.C.

References Cpthread_cleanup_s::argument, c, Cpthread_s::cleanups, free(), Cpthread_cleanup_s::next, and Cpthread_cleanup_s::routine.

Here is the call graph for this function:

int Cpthread_attr_init ( Cpthread_attr_t attr  ) 

Definition at line 209 of file cpthreads.C.

References Cpthread_attr_s::detached, Cpthread_attr_s::magic, and Cpthread_attr_s::stacksize.

Referenced by Cpthread_start_main().

Here is the caller graph for this function:

int Cpthread_attr_destroy ( Cpthread_attr_t attr  ) 

Definition at line 217 of file cpthreads.C.

References Cpthread_attr_s::magic.

int Cpthread_attr_getstacksize ( Cpthread_attr_t attr,
size_t size 
)

Definition at line 224 of file cpthreads.C.

References Cpthread_attr_s::magic, and Cpthread_attr_s::stacksize.

int Cpthread_attr_setstacksize ( Cpthread_attr_t attr,
size_t  size 
)

Definition at line 231 of file cpthreads.C.

References Cpthread_attr_s::magic, and Cpthread_attr_s::stacksize.

int Cpthread_attr_getdetachstate ( Cpthread_attr_t attr,
int state 
)

Definition at line 238 of file cpthreads.C.

References Cpthread_attr_s::detached, and Cpthread_attr_s::magic.

int Cpthread_attr_setdetachstate ( Cpthread_attr_t attr,
int  state 
)

Definition at line 245 of file cpthreads.C.

References Cpthread_attr_s::detached, and Cpthread_attr_s::magic.

Referenced by Cpthread_start_main().

Here is the caller graph for this function:

void Cpthread_top ( Cpthread_t  pt  ) 

Definition at line 263 of file cpthreads.C.

References Cpthread_exit(), data, Cpthread_key_s::next, Cpthread_key_s::offset, Cpthread_s::startarg, and Cpthread_s::startfn.

Referenced by Cpthread_create().

Here is the call graph for this function:

Here is the caller graph for this function:

int Cpthread_create ( Cpthread_t thread,
Cpthread_attr_t attr,
voidfn  fn,
void *  arg 
)

void Cpthread_exit ( void *  status  ) 

int Cpthread_equal ( Cpthread_t  t1,
Cpthread_t  t2 
)

Definition at line 335 of file cpthreads.C.

int Cpthread_detach ( Cpthread_t  pt  ) 

Definition at line 340 of file cpthreads.C.

References Cpthread_s::detached, free(), Cpthread_s::magic, and Cpthread_s::thread.

Here is the call graph for this function:

int Cpthread_join ( Cpthread_t  pt,
void **  status 
)

Definition at line 352 of file cpthreads.C.

References CthSelf(), CthSuspend(), free(), Cpthread_s::joinstatus, Cpthread_s::magic, Cpthread_s::thread, and Cpthread_s::waiting.

Here is the call graph for this function:

int Cpthread_once ( Cpthread_once_t once,
void(*)(void)  fn 
)

Definition at line 364 of file cpthreads.C.

References CmiMyRank(), CmiPrintf(), Cpthread_once_t::flag, and rank.

Here is the call graph for this function:

static void errspan ( void   )  [static]

Definition at line 386 of file cpthreads.C.

References CmiPrintf().

Referenced by Cpthread_cond_broadcast(), Cpthread_cond_destroy(), Cpthread_cond_signal(), Cpthread_cond_wait(), Cpthread_mutex_destroy(), Cpthread_mutex_lock(), Cpthread_mutex_trylock(), and Cpthread_mutex_unlock().

Here is the call graph for this function:

Here is the caller graph for this function:

int Cpthread_mutexattr_init ( Cpthread_mutexattr_t mattr  ) 

Definition at line 392 of file cpthreads.C.

References Cpthread_mutexattr_s::magic.

int Cpthread_mutexattr_destroy ( Cpthread_mutexattr_t mattr  ) 

Definition at line 398 of file cpthreads.C.

References Cpthread_mutexattr_s::magic.

int Cpthread_mutexattr_getpshared ( Cpthread_mutexattr_t mattr,
int pshared 
)

Definition at line 405 of file cpthreads.C.

References Cpthread_mutexattr_s::magic, and Cpthread_mutexattr_s::pshared.

int Cpthread_mutexattr_setpshared ( Cpthread_mutexattr_t mattr,
int  pshared 
)

Definition at line 412 of file cpthreads.C.

References Cpthread_mutexattr_s::magic, and Cpthread_mutexattr_s::pshared.

int Cpthread_mutex_init ( Cpthread_mutex_t mutex,
Cpthread_mutexattr_t mattr 
)

Definition at line 419 of file cpthreads.C.

References CdsFifo_Create(), CmiMyPe(), Cpthread_mutex_s::magic, Cpthread_mutexattr_s::magic, Cpthread_mutex_s::onpe, and Cpthread_mutex_s::users.

Here is the call graph for this function:

int Cpthread_mutex_destroy ( Cpthread_mutex_t mutex  ) 

Definition at line 428 of file cpthreads.C.

References CdsFifo_Destroy(), CdsFifo_Empty(), CmiMyPe(), errspan(), Cpthread_mutex_s::magic, Cpthread_mutex_s::onpe, and Cpthread_mutex_s::users.

Here is the call graph for this function:

int Cpthread_mutex_lock ( Cpthread_mutex_t mutex  ) 

Definition at line 438 of file cpthreads.C.

References CdsFifo_Enqueue(), CdsFifo_Peek(), CmiMyPe(), CthSelf(), CthSuspend(), errspan(), Cpthread_mutex_s::magic, Cpthread_mutex_s::onpe, and Cpthread_mutex_s::users.

Here is the call graph for this function:

int Cpthread_mutex_trylock ( Cpthread_mutex_t mutex  ) 

Definition at line 448 of file cpthreads.C.

References CdsFifo_Empty(), CdsFifo_Enqueue(), CmiMyPe(), CthSelf(), errspan(), Cpthread_mutex_s::magic, Cpthread_mutex_s::onpe, and Cpthread_mutex_s::users.

Here is the call graph for this function:

int Cpthread_mutex_unlock ( Cpthread_mutex_t mutex  ) 

Definition at line 458 of file cpthreads.C.

References CdsFifo_Peek(), CdsFifo_Pop(), CmiMyPe(), CthAwaken(), CthSelf(), errspan(), Cpthread_mutex_s::magic, Cpthread_mutex_s::onpe, and Cpthread_mutex_s::users.

Here is the call graph for this function:

int Cpthread_condattr_init ( Cpthread_condattr_t cattr  ) 

Definition at line 477 of file cpthreads.C.

References Cpthread_condattr_s::magic.

int Cpthread_condattr_destroy ( Cpthread_condattr_t cattr  ) 

Definition at line 483 of file cpthreads.C.

References Cpthread_condattr_s::magic.

int Cpthread_condattr_getpshared ( Cpthread_condattr_t cattr,
int pshared 
)

Definition at line 489 of file cpthreads.C.

References Cpthread_condattr_s::magic, and Cpthread_condattr_s::pshared.

int Cpthread_condattr_setpshared ( Cpthread_condattr_t cattr,
int  pshared 
)

Definition at line 496 of file cpthreads.C.

References Cpthread_condattr_s::magic, and Cpthread_condattr_s::pshared.

int Cpthread_cond_init ( Cpthread_cond_t cond,
Cpthread_condattr_t cattr 
)

Definition at line 503 of file cpthreads.C.

References CdsFifo_Create(), CmiMyPe(), Cpthread_cond_s::magic, Cpthread_condattr_s::magic, Cpthread_cond_s::onpe, and Cpthread_cond_s::users.

Here is the call graph for this function:

int Cpthread_cond_destroy ( Cpthread_cond_t cond  ) 

Definition at line 512 of file cpthreads.C.

References CdsFifo_Destroy(), CmiMyPe(), errspan(), Cpthread_cond_s::magic, Cpthread_cond_s::onpe, and Cpthread_cond_s::users.

Here is the call graph for this function:

int Cpthread_cond_wait ( Cpthread_cond_t cond,
Cpthread_mutex_t mutex 
)

int Cpthread_cond_signal ( Cpthread_cond_t cond  ) 

Definition at line 542 of file cpthreads.C.

References CdsFifo_Dequeue(), CmiMyPe(), CthAwaken(), errspan(), Cpthread_cond_s::magic, Cpthread_cond_s::onpe, and Cpthread_cond_s::users.

Here is the call graph for this function:

int Cpthread_cond_broadcast ( Cpthread_cond_t cond  ) 

Definition at line 552 of file cpthreads.C.

References CdsFifo_Dequeue(), CmiMyPe(), CthAwaken(), errspan(), Cpthread_cond_s::magic, Cpthread_cond_s::onpe, and Cpthread_cond_s::users.

Here is the call graph for this function:

static void Cpthread_main_wrapper ( CmiMainFnArg arg  )  [static]

Definition at line 578 of file cpthreads.C.

References CmiMainFnArg_s::argc, CmiMainFnArg_s::argv, CmiMainFnArg_s::fn, and free().

Referenced by Cpthread_start_main().

Here is the call graph for this function:

Here is the caller graph for this function:

int Cpthread_init ( void   ) 

Definition at line 584 of file cpthreads.C.

void CpthreadModuleInit ( void   ) 

Definition at line 589 of file cpthreads.C.

void Cpthread_start_main ( CmiStartFn  fn,
int  argc,
char **  argv 
)


Variable Documentation

Definition at line 95 of file cpthreads.C.

Definition at line 96 of file cpthreads.C.


Generated on Mon Sep 21 08:01:21 2020 for Charm++ by  doxygen 1.5.5