PPL Logo

conv-core/cpthreads.h File Reference

Go to the source code of this file.

Data Structures

struct  Cpthread_attr_s
struct  Cpthread_mutexattr_s
struct  Cpthread_mutex_s
struct  Cpthread_condattr_s
struct  Cpthread_cond_s
struct  Cpthread_once_t

Typedefs

typedef struct Cpthread_attr_s Cpthread_attr_t
typedef struct Cpthread_key_sCpthread_key_t
typedef struct Cpthread_cleanup_sCpthread_cleanup_t
typedef struct Cpthread_mutexattr_s Cpthread_mutexattr_t
typedef struct Cpthread_condattr_s Cpthread_condattr_t
typedef struct Cpthread_mutex_s Cpthread_mutex_t
typedef struct Cpthread_cond_s Cpthread_cond_t
typedef struct Cpthread_sCpthread_t

Functions

 CtvDeclare (Cpthread_t, Cpthread_current)
 CtvDeclare (int, Cpthread_errcode)
 CtvExtern (Cpthread_t, Cpthread_current)
 CtvExtern (int, Cpthread_errcode)
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)
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)
void Cpthread_exit (void *status)
void Cpthread_top (Cpthread_t pt)
int Cpthread_create (Cpthread_t *thread, Cpthread_attr_t *attr, void *(*fn)(void *), void *arg)
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_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)
int Cpthread_once (Cpthread_once_t *once, void(*fn)(void))
int Cpthread_init (void)
void Cpthread_initialize (void)
void Cpthread_start_main (CmiStartFn fn, int argc, char **argv)


Typedef Documentation

Definition at line 56 of file cpthreads.h.

typedef struct Cpthread_key_s* Cpthread_key_t

Definition at line 57 of file cpthreads.h.

Definition at line 58 of file cpthreads.h.

Definition at line 59 of file cpthreads.h.

Definition at line 60 of file cpthreads.h.

Definition at line 61 of file cpthreads.h.

Definition at line 62 of file cpthreads.h.

typedef struct Cpthread_s* Cpthread_t

Definition at line 63 of file cpthreads.h.


Function Documentation

CtvDeclare ( Cpthread_t  ,
Cpthread_current   
)

CtvDeclare ( int  ,
Cpthread_errcode   
)

CtvExtern ( Cpthread_t  ,
Cpthread_current   
)

CtvExtern ( int  ,
Cpthread_errcode   
)

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:

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:

void Cpthread_exit ( void *  status  ) 

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,
void *(*)(void *)  fn,
void *  arg 
)

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_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:

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:

int Cpthread_init ( void   ) 

Definition at line 584 of file cpthreads.C.

void Cpthread_initialize ( void   ) 

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


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