Go to the source code of this file.
Data Structures | |
struct | CthThreadBase |
struct | CthThreadStruct |
struct | CthProcInfo_s |
struct | CthThreadStruct |
struct | CthThreadStruct |
struct | CthThreadStruct |
struct | CthThreadStruct |
struct | CthThreadStruct |
Typedefs | |
typedef struct CthProcInfo_s * | CthProcInfo |
typedef CthThread * | threadTable |
typedef ucontext_t | uJcontext_t |
typedef void(* | uJcontext_fn_t )(void) |
Functions | |
CLINKAGE void * | memalign (size_t align, size_t size) CMK_THROW |
int | CmiThreadIs (int flag) |
CthThreadToken * | CthGetToken (CthThread t) |
CpvStaticDeclare (int, Cth_serialNo) | |
int | CthAliasCreate (int stackSize) |
Create an aliasable area of this size. | |
void | CthAliasFree (int fd) |
void | CthAliasEnable (CthThreadBase *t) |
CthCpvStatic (CthThread, CthCurrent) | |
CthCpvDeclare (char *, CthData) | |
CthCpvStatic (size_t, CthDatasize) | |
void | CthSetThreadID (CthThread th, int a, int b, int c) |
CmiObjId * | CthGetThreadID (CthThread th) |
char * | CthGetData (CthThread t) |
static void | CthFixData (CthThread t) |
size_t | CthRegister (size_t size) |
Allocate another size bytes of thread-local storage, and return the offset into the thread storage buffer. | |
void | CthRegistered (size_t maxOffset) |
Make sure we have room to store up to at least maxOffset bytes of thread-local storage. | |
CthCpvStatic (int, _defaultStackSize) | |
void | CthSetSerialNo (CthThread t, int no) |
static void | CthThreadBaseInit (CthThreadBase *th) |
static void * | CthAllocateStack (CthThreadBase *th, int *stackSize, int useMigratable) |
static void | CthThreadBaseFree (CthThreadBase *th) |
CthCpvStatic (tlsseg_t, _ctgTLS) | |
void | CtgInstallTLS (void *cur, void *next) |
for TLS globals | |
void | CtgInstallMainThreadTLS (void *cur) |
void | CtgInstallCthTLS (void *cur, void *next) |
void | CmiDisableTLS (void) |
void | CmiEnableTLS (void) |
static void | CthBaseInit (char **argv) |
int | CthImplemented (void) |
CthThread | CthSelf (void) |
void | CthPupBase (pup_er p, CthThreadBase *t, int useMigratable) |
static void | CthThreadFinished (CthThread t) |
void | CthSetSuspendable (CthThread t, int val) |
int | CthIsSuspendable (CthThread t) |
void | CthSetNext (CthThread t, CthThread v) |
CthThread | CthGetNext (CthThread t) |
void | CthSetPrev (CthThread t, CthThread v) |
void | CthSetEventInfo (CthThread t, int event, int srcPE) |
static void | CthNoStrategy (void) |
void | CthSetStrategy (CthThread t, CthAwkFn awkfn, CthThFn chsfn) |
int | CthScheduled (CthThread t) |
void | CthScheduledDecrement () |
static void | CthBaseResume (CthThread t) |
void | CthSwitchThread (CthThread t) |
switch the thread to t | |
void | CthCheckThreadSanity (void) |
void | CthSuspend (void) |
void | CthAwaken (CthThread th) |
void | CthYield (void) |
void | CthAwakenPrio (CthThread th, int s, int pb, unsigned int *prio) |
void | CthYieldPrio (int s, int pb, unsigned int *prio) |
void | CthAddListener (CthThread t, struct CthThreadListener *l) |
This listener is about to begin receiving suspend and resume events for this thread. | |
int | CthMigratable (void) |
CthThread | CthPup (pup_er p, CthThread t) |
CthCpvDeclare (CthProcInfo, CthProc) | |
static void | CthThreadInit (CthThread t, CthVoidFn fn, void *arg) |
static void | CthThreadFree (CthThread t) |
void | CthFree (CthThread t) |
void | CthDummy (void) |
void | CthInit (char **argv) |
static void | CthOnly (CthThread t, void *dum1, void *dum2) |
size_t | CthStackOffset (CthThread t, char *p) |
char * | CthPointer (CthThread t, size_t pos) |
static void | CthResume1 (qt_t *sp, CthProcInfo proc, CthThread t) |
void | CthResume (CthThread t) |
CthThread | CthCreate (CthVoidFn fn, void *arg, int size) |
CthThread | CthCreateMigratable (CthVoidFn fn, void *arg, int size) |
CthCpvStatic (CthThread, CthPrevious) | |
CthCpvStatic (int, tablesize) | |
CthCpvStatic (threadTable, exitThreads) | |
CthCpvStatic (int, nExit) | |
static void | CthThreadInit (CthThread t) |
static void | CthClearThreads (void) |
void | CthFiberBlock (CthThread t) |
VOID CALLBACK | FiberSetUp (PVOID fiberData) |
CthCpvStatic (pthread_mutex_t, sched_mutex) | |
The sched_mutex is the current token of execution. | |
static void * | CthOnly (void *arg) |
static CMI_FORCE_INLINE int | setJcontext (const uJcontext_t *ucp) |
static CMI_FORCE_INLINE int | swapJcontext (uJcontext_t *oucp, const uJcontext_t *ucp) |
static CMI_FORCE_INLINE void | makeJcontext (uJcontext_t *ucp, uJcontext_fn_t func, int argc, void *a1, void *a2) |
CpvStaticDeclare (CthThread, doomedThreadPool) | |
void | CthStartThread (CmiUInt4 fn1, CmiUInt4 fn2, CmiUInt4 arg1, CmiUInt4 arg2) |
void | CthStartThread (transfer_t arg) |
void | CthStartThread (qt_userf_t fn, void *arg) |
int | ptrDiffLen (const void *a, const void *b) |
static CthThread | CthCreateInner (CthVoidFn fn, void *arg, int size, int migratable) |
void | setProtection (char *, char *, int, int) |
static CthThread | CthThreadInit (void) |
static void * | CthAbortHelp (qt_t *sp, CthThread old, void *null) |
static void * | CthBlockHelp (qt_t *sp, CthThread old, void *null) |
static void | CthOnly (void *arg, void *vt, qt_userf_t fn) |
void | CthPrintThdStack (CthThread t) |
void | CthTraceResume (CthThread t) |
void | CthPrintThdMagic (CthThread t) |
void * | CmiIsomallocMallocForThread (CthThread th, size_t nBytes) |
void * | CmiIsomallocMallocAlignForThread (CthThread th, size_t align, size_t nBytes) |
Variables | |
static int | CmiThreadIs_flag = 0 |
CthThreadBase * | _curMappedStack = 0 |
CthAliasEnable brings this thread's stack into memory. | |
static tlsseg_t | _oldtlsseg [128] = {0} |
static int | tlsseg_ptr = -1 |
typedef struct CthProcInfo_s* CthProcInfo |
typedef CthThread* threadTable |
typedef ucontext_t uJcontext_t |
typedef void(* uJcontext_fn_t)(void) |
Definition at line 209 of file threads.C.
References CmiThreadIs_flag.
Referenced by checkAddress(), and meta_malloc().
CthThreadToken* CthGetToken | ( | CthThread | t | ) |
Definition at line 219 of file threads.C.
Referenced by CthResumeSchedulingThread().
CpvStaticDeclare | ( | int | , | |
Cth_serialNo | ||||
) |
Create an aliasable area of this size.
Returns alias handle.
Definition at line 261 of file threads.C.
References CmiAbort(), fd, and Ck::IO::write().
Referenced by CthAllocateStack().
void CthAliasFree | ( | int | fd | ) |
Definition at line 281 of file threads.C.
References Ck::IO::close().
Referenced by CthThreadBaseFree().
void CthAliasEnable | ( | CthThreadBase * | t | ) |
Definition at line 294 of file threads.C.
References CmiAbort(), CthThreadBase::isMigratable, PUP::s, CthThreadBase::stack, and CthThreadBase::stacksize.
Referenced by CthBaseResume(), CthCreateInner(), and CthPupBase().
CthCpvStatic | ( | CthThread | , | |
CthCurrent | ||||
) |
CthCpvDeclare | ( | char * | , | |
CthData | ||||
) |
CthCpvStatic | ( | size_t | , | |
CthDatasize | ||||
) |
Definition at line 330 of file threads.C.
Referenced by CkMigratable::CkAddThreadListeners(), Group::CkAddThreadListeners(), and Chare::CkAddThreadListeners().
Definition at line 338 of file threads.C.
Referenced by CthEnqueueSuspendedStealableThread(), and traceThreadListener_resume().
static void CthFixData | ( | CthThread | t | ) | [inline, static] |
Definition at line 352 of file threads.C.
References data, and realloc().
Referenced by CthBaseResume(), CthRegister(), CthRegistered(), and CthThreadBaseInit().
Allocate another size bytes of thread-local storage, and return the offset into the thread storage buffer.
Definition at line 369 of file threads.C.
References CthFixData(), and CthThreadBase::data.
Referenced by Cpthread_key_create().
void CthRegistered | ( | size_t | maxOffset | ) |
Make sure we have room to store up to at least maxOffset bytes of thread-local storage.
Definition at line 388 of file threads.C.
References CthFixData(), and CthThreadBase::data.
CthCpvStatic | ( | int | , | |
_defaultStackSize | ||||
) |
static void CthThreadBaseInit | ( | CthThreadBase * | th | ) | [static] |
Definition at line 405 of file threads.C.
References CthThreadBase::aliasStackHandle, CthThreadBase::awakenfn, CthThreadBase::choosefn, CmiMyPe(), CthFixData(), CthSetStrategyDefault(), CthThreadBase::data, CthThreadBase::datasize, CthThreadBase::exiting, _CmiObjId::id, CthThreadBase::isMigratable, CthThreadBase::isomallocBlockList, CthThreadBase::listener, CthThreadBase::magic, malloc(), CthThreadBase::next, CthThreadBase::scheduled, CthThreadToken::serialNo, CthThreadBase::stack, CthThreadBase::stacksize, CthThreadBase::suspendable, CthThreadToken::thread, CthThreadBase::tid, and CthThreadBase::token.
Referenced by CthThreadInit().
static void* CthAllocateStack | ( | CthThreadBase * | th, | |
int * | stackSize, | |||
int | useMigratable | |||
) | [static] |
Definition at line 451 of file threads.C.
References CthThreadBase::aliasStackHandle, CmiIsomallocBlockListMalloc(), CmiIsomallocBlockListMallocAlign(), CmiIsomallocBlockListNew(), CmiIsomallocEnabled(), CthAliasCreate(), CthThreadBase::isMigratable, CthThreadBase::isomallocBlockList, malloc(), CthThreadBase::stack, CthThreadBase::stacksize, and CthThreadBase::valgrindStackID.
Referenced by CthCreateInner(), and CthPupBase().
static void CthThreadBaseFree | ( | CthThreadBase * | th | ) | [static] |
Definition at line 483 of file threads.C.
References CthThreadBase::aliasStackHandle, CmiIsomallocBlockListDelete(), CthAliasFree(), CthThreadBase::data, CthThreadListener::free, free(), CthThreadBase::isMigratable, CthThreadBase::isomallocBlockList, PUP::l, CthThreadBase::listener, CthThreadListener::next, CthThreadBase::scheduled, CthThreadBase::stack, CthThreadToken::thread, CthThreadBase::token, and CthThreadBase::valgrindStackID.
Referenced by CthThreadFree().
CthCpvStatic | ( | tlsseg_t | , | |
_ctgTLS | ||||
) |
void CtgInstallTLS | ( | void * | cur, | |
void * | next | |||
) |
for TLS globals
Definition at line 529 of file threads.C.
References switchTLS().
void CtgInstallMainThreadTLS | ( | void * | cur | ) |
Definition at line 538 of file threads.C.
References switchTLS().
void CtgInstallCthTLS | ( | void * | cur, | |
void * | next | |||
) |
Definition at line 543 of file threads.C.
References switchTLS().
void CmiDisableTLS | ( | void | ) |
Definition at line 551 of file threads.C.
References switchTLS(), and tlsseg_ptr.
Referenced by FTN_NAME().
void CmiEnableTLS | ( | void | ) |
Definition at line 558 of file threads.C.
References switchTLS(), and tlsseg_ptr.
Referenced by FTN_NAME().
static void CthBaseInit | ( | char ** | argv | ) | [static] |
Definition at line 572 of file threads.C.
References CmiGetArgStringDesc(), CmiReadSize(), CmiThreadIs_flag, CmiTLSInit(), and currentTLS().
Referenced by CthInit().
CthThread CthSelf | ( | void | ) |
Definition at line 606 of file threads.C.
Referenced by CfutureWait(), CkWaitFutureID(), CmiIsomallocBlockListPup(), CpmThread3(), Cpthread_cond_wait(), Cpthread_join(), Cpthread_mutex_lock(), Cpthread_mutex_trylock(), Cpthread_mutex_unlock(), CthFree(), CthOnly(), CthResumeNormalThread(), CthResumeNormalThreadDebug(), CthResumeSchedulingThread(), CthResumeStealableThread(), CthSchedInit(), CthScheduledDecrement(), CthStartThread(), CthSuspend(), CthSuspendStealableThread(), PythonObject::executeThread(), FiberSetUp(), MSA_CacheGroup< ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE >::getListener(), TCharm::getSema(), SearchGroup::getTotalSolutions(), CkCallback::impl_thread_delay(), ParFUMShadowArray::lockRegion(), PUPmarshall(), TCharm::stop(), MSA_Thread_Listener::suspend(), TCharm::TCharm(), CkSema::wait(), CkSema::waitN(), and waitqd_QDChare::waitQD().
void CthPupBase | ( | pup_er | p, | |
CthThreadBase * | t, | |||
int | useMigratable | |||
) |
Definition at line 611 of file threads.C.
References _BgOutOfCoreFlag, CthThreadBase::awakenfn, CthThreadBase::choosefn, CmiAbort(), CmiIsomallocBlockListPup(), CthAliasEnable(), CthAllocateStack(), CthThreadBase::data, CthThreadBase::datasize, CthThreadBase::isMigratable, CthThreadBase::isomallocBlockList, CthThreadBase::listener, CthThreadBase::magic, malloc(), tlsseg::memseg, CthThreadBase::next, pup_bytes(), pup_isSizing, pup_isUnpacking(), CthThreadBase::scheduled, CthThreadToken::serialNo, tlsseg::size, CthThreadBase::stack, CthThreadBase::stacksize, CthThreadBase::suspendable, CthThreadToken::thread, CthThreadBase::tlsseg, and CthThreadBase::token.
Referenced by CthPup().
static void CthThreadFinished | ( | CthThread | t | ) | [static] |
Definition at line 715 of file threads.C.
References CthSuspend().
Referenced by CthOnly(), CthStartThread(), and FiberSetUp().
Definition at line 727 of file threads.C.
Referenced by CfutureWait(), CkWaitFutureID(), CthResumeSchedulingThread(), and CthResumeStealableThread().
Definition at line 728 of file threads.C.
Referenced by CfutureAwaken(), CthSuspendSchedulingThread(), CthSuspendStealableThread(), and setFuture().
Definition at line 730 of file threads.C.
Referenced by CthResumeNormalThread(), CthResumeNormalThreadDebug(), CthResumeSchedulingThread(), CthResumeStealableThread(), and CthSuspend().
static void CthNoStrategy | ( | void | ) | [static] |
Definition at line 738 of file threads.C.
References CmiAbort().
Referenced by CthAwaken(), CthAwakenPrio(), and CthSuspend().
Definition at line 743 of file threads.C.
Referenced by CthSchedInit(), CthSetStrategyDefault(), CthSetStrategySuspendedWorkStealing(), CthSetStrategyWorkStealing(), and CthSuspendSchedulingThread().
void CthScheduledDecrement | ( | void | ) |
Definition at line 755 of file threads.C.
References CmiAbort(), CmiMyRank(), CmiWallTimer(), CthSelf(), and memory_order_release.
Referenced by CthResumeNormalThread(), CthResumeNormalThreadDebug(), CthResumeSchedulingThread(), CthResumeStealableThread(), and CthSuspend().
static void CthBaseResume | ( | CthThread | t | ) | [inline, static] |
Definition at line 775 of file threads.C.
References CthAliasEnable(), CthFixData(), PUP::l, CthThreadListener::next, and CthThreadListener::resume.
Referenced by CthResume(), CthResume1(), and CthSwitchThread().
void CthSwitchThread | ( | CthThread | t | ) |
switch the thread to t
Definition at line 790 of file threads.C.
References CthBaseResume().
void CthCheckThreadSanity | ( | void | ) |
Definition at line 801 of file threads.C.
References CmiAbort(), CthThreadBase::magic, CthThreadBase::stack, and CthThreadBase::stacksize.
Referenced by CthSuspend().
void CthSuspend | ( | void | ) |
Sometimes, a CthThread is running without ever being awakened In this case, the scheduled is the initialized value "0"
Definition at line 827 of file threads.C.
References CthThreadBase::choosefn, CmiAbort(), CmiMyRank(), CmiWallTimer(), CthCheckThreadSanity(), CthNoStrategy(), CthResume(), CthScheduledDecrement(), CthSelf(), CthSetPrev(), CthThreadBase::exiting, _CmiObjId::id, PUP::l, CthThreadBase::listener, CthThreadListener::next, CthThreadBase::scheduled, CthThreadListener::suspend, CthThreadBase::suspendable, CthThreadBase::tid, and traceSuspend().
Referenced by CfutureWait(), CkWaitFutureID(), CPathRecv(), CpmThread3(), Cpthread_cond_wait(), Cpthread_exit(), Cpthread_join(), Cpthread_mutex_lock(), CthThreadFinished(), CthYield(), CthYieldPrio(), SearchGroup::getTotalSolutions(), CkCallback::impl_thread_delay(), ParFUMShadowArray::lockRegion(), TCharm::stop(), MSA_Thread_Listener::suspend(), ParFUMShadowArray::unlockRegion(), ParFUMShadowArray::unpendRegion(), CkSema::wait(), CkSema::waitN(), and waitqd_QDChare::waitQD().
void CthAwaken | ( | CthThread | th | ) |
Definition at line 886 of file threads.C.
References CthNoStrategy(), and traceAwaken().
Referenced by CfutureAwaken(), SearchGroup::childCount(), CPathGetSingle(), CPathSendHandler(), CpmThread2(), CpmThreadSize2(), Cpthread_cond_broadcast(), Cpthread_cond_signal(), Cpthread_cond_wait(), Cpthread_create(), Cpthread_exit(), Cpthread_mutex_unlock(), CthYield(), ParFUMShadowArray::lockReply(), waitqd_QDChare::onQD(), CkCallback::send(), setFuture(), MSA_Thread_Listener::signal(), CkSema::signal(), TCharm::start(), and ParFUMShadowArray::unlockReply().
void CthYield | ( | void | ) |
Definition at line 910 of file threads.C.
References CthAwaken(), and CthSuspend().
Referenced by chunk::addRemoteEdge(), MeshStreamer< dtype >::broadcast(), FEM_Adapt_Algs::Coarsen(), chunk::coarseningElements(), FEM_AdaptL::edge_bisect(), FEM_AdaptL::edge_contraction(), FEM_AdaptL::edge_contraction_help(), FEM_AdaptL::edge_flip(), chunk::getAccessLock(), chunk::getAdjustLock(), FEM_MUtil::idxllockLocal(), MeshStreamer< dtype >::insertData(), FEM_lock::lock(), element::lockArc(), element::lockLF(), FEM_AdaptL::lockNodes(), NetFEM_Begin(), ParFUMShadowArray::recv_splits(), FEM_Adapt_Algs::Refine(), Bulk_Adapt::Refine_h(), element::refineCP(), element::refineLE(), element::refineLF(), chunk::refiningElements(), FEM_lock::unlock(), and FEM_AdaptL::vertex_remove().
Definition at line 919 of file threads.C.
References CthNoStrategy(), and traceAwaken().
Referenced by CthYieldPrio().
Definition at line 934 of file threads.C.
References CthAwakenPrio(), and CthSuspend().
void CthAddListener | ( | CthThread | th, | |
struct CthThreadListener * | l | |||
) |
This listener is about to begin receiving suspend and resume events for this thread.
"suspend", "resume", "free", and "data" fields must all already be set. When this thread exits, l->free will be called on this listener, which should deallocate the listener memory.
Definition at line 943 of file threads.C.
References CthThreadListener::next, p, and CthThreadListener::thread.
Referenced by CkMigratable::CkAddThreadListeners(), and TraceProjections::traceAddThreadListeners().
int CthMigratable | ( | void | ) |
Definition at line 1008 of file threads.C.
Referenced by TCharm::migrateTo(), and TCHARM_Migrate().
Definition at line 1013 of file threads.C.
References CmiAbort(), CthFree(), CthPupBase(), malloc(), pup_bytes(), pup_isDeleting(), and pup_isUnpacking().
Referenced by TCharm::pupThread().
CthCpvDeclare | ( | CthProcInfo | , | |
CthProc | ||||
) |
Definition at line 1045 of file threads.C.
References CthThreadStruct::base, CthThreadBaseInit(), CthThreadStruct::savedptr, CthThreadStruct::savedsize, CthThreadStruct::savedstack, CthThreadStruct::stacklen, CthThreadStruct::startarg, and CthThreadStruct::startfn.
Referenced by CthCreate(), CthCreateInner(), and CthInit().
static void CthThreadFree | ( | CthThread | t | ) | [static] |
Definition at line 1056 of file threads.C.
References CthThreadStruct::base, CthThreadBaseFree(), free(), and CthThreadStruct::savedstack.
Referenced by CthAbortHelp(), CthClearThreads(), CthFiberBlock(), CthFree(), and CthResume1().
void CthFree | ( | CthThread | t | ) |
Definition at line 1063 of file threads.C.
References CthThreadStruct::base, CthClearThreads(), CthSelf(), CthThreadFree(), CthThreadBase::exiting, free(), and malloc().
Referenced by TCharm::clear(), CpmThread3(), Cpthread_exit(), CthPup(), and TCharm::~TCharm().
void CthDummy | ( | void | ) |
Definition at line 1075 of file threads.C.
Referenced by CthInit(), and CthResume1().
void CthInit | ( | char ** | argv | ) |
Definition at line 1077 of file threads.C.
References CmiThreadIs_flag, CthBaseInit(), CthDummy(), CthThreadInit(), malloc(), p, size_t, CthProcInfo_s::stackbase, CthProcInfo_s::switchbuf, CthProcInfo_s::switchbuf_sp, and PUP::t.
Referenced by ConverseRunPE().
static void CthOnly | ( | CthThread | t, | |
void * | dum1, | |||
void * | dum2 | |||
) | [static] |
Definition at line 1112 of file threads.C.
References CthThreadFinished(), CthThreadStruct::startarg, and CthThreadStruct::startfn.
Referenced by CthResume1().
Definition at line 1121 of file threads.C.
References PUP::s, CthThreadStruct::stack, and CthProcInfo_s::stackbase.
Referenced by TCharm::UserData::UserData().
Definition at line 1127 of file threads.C.
References p, CthThreadStruct::savedsize, CthThreadStruct::savedstack, CthThreadStruct::stack, and CthProcInfo_s::stackbase.
Referenced by TCharm::UserData::getData(), and TCharm::UserData::pup().
static void CthResume1 | ( | qt_t * | sp, | |
CthProcInfo | proc, | |||
CthThread | t | |||
) | [static] |
Definition at line 1145 of file threads.C.
References CthThreadStruct::base, CthBaseResume(), CthDummy(), CthOnly(), CthThreadFree(), CthThreadBase::exiting, free(), malloc(), CthThreadStruct::savedptr, CthThreadStruct::savedsize, CthThreadStruct::savedstack, size_t, CthProcInfo_s::stackbase, and CthThreadStruct::stacklen.
Referenced by CthResume().
void CthResume | ( | CthThread | t | ) |
Definition at line 1185 of file threads.C.
References CthThreadStruct::base, CthBaseResume(), CthFiberBlock(), CthResume1(), CthThreadBase::exiting, CthThreadStruct::fiber, and CthProcInfo_s::switchbuf_sp.
Referenced by CpdPythonGroup::cpdCheck(), CthResumeNormalThread(), CthResumeNormalThreadDebug(), CthResumeSchedulingThread(), CthResumeStealableThread(), CthSuspend(), and PythonObject::execute().
Definition at line 1191 of file threads.C.
References CmiAbort(), CthThreadInit(), CthThreadStruct::fiber, FiberSetUp(), and malloc().
Referenced by CPathGetSingle(), CpdPythonGroup::cpdCheck(), CpmThread2(), CpmThreadSize2(), Cpthread_create(), CthCreateMigratable(), CthSuspendSchedulingThread(), PythonObject::execute(), and TCharm::TCharm().
Definition at line 1198 of file threads.C.
References CthCreate().
Referenced by TCharm::TCharm().
CthCpvStatic | ( | CthThread | , | |
CthPrevious | ||||
) |
CthCpvStatic | ( | int | , | |
tablesize | ||||
) |
CthCpvStatic | ( | threadTable | , | |
exitThreads | ||||
) |
CthCpvStatic | ( | int | , | |
nExit | ||||
) |
static void CthThreadInit | ( | CthThread | t | ) | [static] |
Definition at line 1229 of file threads.C.
References CthThreadStruct::base, and CthThreadBaseInit().
static void CthClearThreads | ( | void | ) | [static] |
Definition at line 1270 of file threads.C.
References CthThreadFree(), PUP::m, n, and p.
Referenced by CthFree(), and FiberSetUp().
void CthFiberBlock | ( | CthThread | t | ) |
Definition at line 1329 of file threads.C.
References CthThreadFree(), and CthThreadStruct::fiber.
Referenced by CthResume().
VOID CALLBACK FiberSetUp | ( | PVOID | fiberData | ) |
Definition at line 1359 of file threads.C.
References CthClearThreads(), CthSelf(), and CthThreadFinished().
Referenced by CthCreate().
CthCpvStatic | ( | pthread_mutex_t | , | |
sched_mutex | ||||
) |
The sched_mutex is the current token of execution.
Only the running thread holds this lock; all other threads have released the lock and are waiting on their condition variable.
static void* CthOnly | ( | void * | arg | ) | [static] |
Definition at line 1501 of file threads.C.
References CthThreadStruct::arg, CthThreadStruct::cond, CthThreadStruct::creator, CthThreadFinished(), CthThreadStruct::fn, and CthThreadStruct::inited.
static CMI_FORCE_INLINE int setJcontext | ( | const uJcontext_t * | ucp | ) | [static] |
Definition at line 1629 of file threads.C.
Referenced by setJcontext(), and swapJcontext().
static CMI_FORCE_INLINE int swapJcontext | ( | uJcontext_t * | oucp, | |
const uJcontext_t * | ucp | |||
) | [static] |
Definition at line 1633 of file threads.C.
Referenced by setJcontext().
static CMI_FORCE_INLINE void makeJcontext | ( | uJcontext_t * | ucp, | |
uJcontext_fn_t | func, | |||
int | argc, | |||
void * | a1, | |||
void * | a2 | |||
) | [static] |
Definition at line 1637 of file threads.C.
Referenced by CthCreateInner().
CpvStaticDeclare | ( | CthThread | , | |
doomedThreadPool | ||||
) |
Definition at line 1766 of file threads.C.
References CmiWallTimer(), CthSelf(), and CthThreadFinished().
Referenced by CthCreateInner().
void CthStartThread | ( | transfer_t | arg | ) |
Definition at line 1777 of file threads.C.
References uFcontext_t::arg, CthSelf(), CthThreadFinished(), data_t::data, transfer_t::data, data, transfer_t::fctx, data_t::from, and uFcontext_t::func.
void CthStartThread | ( | qt_userf_t | fn, | |
void * | arg | |||
) |
Definition at line 1787 of file threads.C.
References CthSelf(), and CthThreadFinished().
int ptrDiffLen | ( | const void * | a, | |
const void * | b | |||
) |
Definition at line 1797 of file threads.C.
Referenced by CthCreateInner().
Definition at line 1804 of file threads.C.
References allocNewTLSSeg(), CthThreadStruct::base, CmiAbort(), CthThreadStruct::context, CthAliasEnable(), CthAllocateStack(), CthStartThread(), CthThreadInit(), getJcontext(), makeJcontext(), malloc(), ptrDiffLen(), uJcontext_stack_t::ss_flags, uJcontext_stack_t::ss_size, uJcontext_stack_t::ss_sp, CthThreadBase::stack, uJcontext_t::uc_link, and uJcontext_t::uc_stack.
static CthThread CthThreadInit | ( | void | ) | [static] |
Definition at line 2011 of file threads.C.
References CthThreadStruct::base, CthThreadBaseInit(), malloc(), CthThreadStruct::protect, and CthThreadStruct::protlen.
static void* CthAbortHelp | ( | qt_t * | sp, | |
CthThread | old, | |||
void * | null | |||
) | [static] |
Definition at line 2056 of file threads.C.
References CthThreadFree().
static void* CthBlockHelp | ( | qt_t * | sp, | |
CthThread | old, | |||
void * | null | |||
) | [static] |
static void CthOnly | ( | void * | arg, | |
void * | vt, | |||
qt_userf_t | fn | |||
) | [static] |
Definition at line 2092 of file threads.C.
References CthSelf(), and CthThreadFinished().
void CthPrintThdStack | ( | CthThread | t | ) |
Definition at line 2178 of file threads.C.
References CthThreadStruct::base, CmiPrintf(), CthThreadBase::stack, and CthThreadStruct::stackp.
void CthTraceResume | ( | CthThread | t | ) |
Definition at line 2210 of file threads.C.
References CthThreadStruct::base, CthThreadBase::tid, and traceResume().
Referenced by CthResumeNormalThread(), CthResumeNormalThreadDebug(), CthResumeSchedulingThread(), CthResumeStealableThread(), and PUPmarshall().
void CthPrintThdMagic | ( | CthThread | t | ) |
Definition at line 2216 of file threads.C.
References CthThreadStruct::base, CmiPrintf(), and CthThreadBase::magic.
Definition at line 2220 of file threads.C.
References CmiIsomallocBlockListMalloc(), CmiIsomallocBlockListNew(), and CmiIsomallocEnabled().
Referenced by CtgGlobalStruct::allocate().
Definition at line 2227 of file threads.C.
References CmiIsomallocBlockListMallocAlign(), CmiIsomallocBlockListNew(), and CmiIsomallocEnabled().
Referenced by allocNewTLSSeg().
int CmiThreadIs_flag = 0 [static] |
Definition at line 207 of file threads.C.
Referenced by CmiThreadIs(), CthBaseInit(), and CthInit().
tlsseg_t _oldtlsseg[128] = {0} [static] |
int tlsseg_ptr = -1 [static] |