
Go to the source code of this file.
| typedef void*(* voidfn)(void *) |
Definition at line 55 of file cpthreads.C.
| typedef struct CmiMainFnArg_s CmiMainFnArg |
| 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.

| 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.

| 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.

| 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().

| int Cpthread_attr_destroy | ( | Cpthread_attr_t * | attr | ) |
| 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().

| 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().


| int Cpthread_create | ( | Cpthread_t * | thread, | |
| Cpthread_attr_t * | attr, | |||
| voidfn | fn, | |||
| void * | arg | |||
| ) |
Definition at line 276 of file cpthreads.C.
References Cpthread_s::cleanups, Cpthread_top(), CthAwaken(), CthCreate(), CthSetStrategyDefault(), Cpthread_attr_s::detached, Cpthread_s::detached, Cpthread_s::joinstatus, Cpthread_s::magic, Cpthread_attr_s::magic, malloc(), Cpthread_attr_s::stacksize, Cpthread_s::startarg, Cpthread_s::startfn, Cpthread_s::thread, and Cpthread_s::waiting.
Referenced by Cpthread_start_main().


| void Cpthread_exit | ( | void * | status | ) |
Definition at line 297 of file cpthreads.C.
References Cpthread_cleanup_s::argument, c, Cpthread_s::cleanups, CthAwaken(), CthFree(), CthSuspend(), data, Cpthread_key_s::destructo, Cpthread_s::detached, free(), Cpthread_s::joinstatus, Cpthread_s::magic, Cpthread_key_s::next, Cpthread_cleanup_s::next, Cpthread_key_s::offset, Cpthread_cleanup_s::routine, PUP::t, Cpthread_s::thread, and Cpthread_s::waiting.
Referenced by Cpthread_top().


| 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.

| 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.

| 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.

| 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().


| 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 | |||
| ) |
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.

| 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.

| 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.

| 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.

| 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.

| 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 | |||
| ) |
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.

| 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.

| int Cpthread_cond_wait | ( | Cpthread_cond_t * | cond, | |
| Cpthread_mutex_t * | mutex | |||
| ) |
Definition at line 521 of file cpthreads.C.
References CdsFifo_Enqueue(), CdsFifo_Peek(), CdsFifo_Pop(), CmiMyPe(), CthAwaken(), CthSelf(), CthSuspend(), errspan(), Cpthread_mutex_s::magic, Cpthread_cond_s::magic, Cpthread_mutex_s::onpe, Cpthread_cond_s::onpe, Cpthread_cond_s::users, and Cpthread_mutex_s::users.

| 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.

| 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.

| 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().


| 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 | |||
| ) |
Definition at line 595 of file cpthreads.C.
References CmiMainFnArg_s::argc, CmiMainFnArg_s::argv, CmiMyRank(), Cpthread_attr_init(), Cpthread_attr_setdetachstate(), Cpthread_create(), Cpthread_main_wrapper(), CmiMainFnArg_s::fn, and malloc().

Definition at line 95 of file cpthreads.C.
Definition at line 96 of file cpthreads.C.
1.5.5