
Futures--ways to block Converse threads on remote events.
A "future" represents a thread of control that has been passed to another processor. It provides a place for a (local) thread to block and the machinery for resuming control based on a remote event. Futures are thus used to implement Charm++'s "[sync]" methods.
This "sequential futures abstraction" is a well-studied concept in remote process control.
These routines are implemented in ckfutures.C.
| typedef int CkFutureID |
Definition at line 13 of file ckfutures.h.
| CpvStaticDeclare | ( | FutureState | , | |
| futurestate | ||||
| ) |
| CpvStaticDeclare | ( | CkSemaPool * | , | |
| semapool | ||||
| ) |
Definition at line 118 of file ckfutures.C.
References FutureState::array, FutureState::freelist, and Future_s::next.
Referenced by _futuresModuleInit(), and createFuture().
| static int createFuture | ( | void | ) | [inline, static] |
Definition at line 132 of file ckfutures.C.
References addedFutures(), FutureState::array, FutureState::freelist, FutureState::max, Future_s::next, Future_s::ready, realloc(), Future_s::value, and Future_s::waiters.
Referenced by CkCreateAttachedFuture(), CkCreateAttachedFutureSend(), and CkCreateFuture().
| CkFuture CkCreateFuture | ( | void | ) |
Definition at line 156 of file ckfutures.C.
References Converse::CkMyPe(), createFuture(), _CkFuture::id, and _CkFuture::pe.
| void CkReleaseFutureID | ( | CkFutureID | handle | ) |
Definition at line 165 of file ckfutures.C.
References FutureState::array, FutureState::freelist, and Future_s::next.
Referenced by CkReleaseFuture(), and CkWaitReleaseFuture().
| int CkProbeFutureID | ( | CkFutureID | handle | ) |
Definition at line 174 of file ckfutures.C.
References FutureState::array, and Future_s::ready.
Referenced by CkProbeFuture().
| void * CkWaitFutureID | ( | CkFutureID | handle | ) |
Definition at line 182 of file ckfutures.C.
References FutureState::array, CthSelf(), CthSetNext(), CthSuspend(), Future_s::ready, Future_s::value, value, and Future_s::waiters.
Referenced by CkWaitFuture(), CkWaitReleaseFuture(), CkWaitVoidFuture(), ampi::winAccumulate(), ampi::winGet(), ampi::winLock(), ampi::winPut(), and ampi::winUnlock().
| void CkReleaseFuture | ( | CkFuture | fut | ) |
| void * CkWaitFuture | ( | CkFuture | fut | ) |
| void CkWaitVoidFuture | ( | CkFutureID | handle | ) |
| static void setFuture | ( | CkFutureID | handle, | |
| void * | pointer | |||
| ) | [static] |
Definition at line 229 of file ckfutures.C.
References FutureState::array, CthAwaken(), CthGetNext(), Future_s::ready, Future_s::value, and Future_s::waiters.
Referenced by FutureBOC::SetFuture().
| void _futuresModuleInit | ( | void | ) |
Definition at line 244 of file ckfutures.C.
References addedFutures(), and malloc().
Referenced by _initCharm().
| CkFutureID CkRemoteBranchCallAsync | ( | int | ep, | |
| void * | m, | |||
| CkGroupID | group, | |||
| int | PE | |||
| ) |
Definition at line 272 of file ckfutures.C.
References CkCreateAttachedFuture(), and CkSendMsgBranch().
Referenced by CkRemoteBranchCall().
Definition at line 280 of file ckfutures.C.
References CkRemoteBranchCallAsync(), and CkWaitReleaseFuture().
| CkFutureID CkRemoteNodeBranchCallAsync | ( | int | ep, | |
| void * | m, | |||
| CkGroupID | group, | |||
| int | node | |||
| ) |
Definition at line 287 of file ckfutures.C.
References CkCreateAttachedFuture(), and CkSendMsgNodeBranch().
Referenced by CkRemoteNodeBranchCall().
Definition at line 295 of file ckfutures.C.
References CkRemoteNodeBranchCallAsync(), and CkWaitReleaseFuture().
| CkFutureID CkRemoteCallAsync | ( | int | ep, | |
| void * | m, | |||
| const CkChareID * | ID | |||
| ) |
Definition at line 302 of file ckfutures.C.
References CkCreateAttachedFuture(), and CkSendMsg().
Referenced by CkRemoteCall().
Definition at line 310 of file ckfutures.C.
References CkRemoteCallAsync(), and CkWaitReleaseFuture().
| CkFutureID CkCreateAttachedFuture | ( | void * | msg | ) |
Definition at line 317 of file ckfutures.C.
References createFuture(), envelope::setRef(), and UsrToEnv().
Referenced by CkRemoteBranchCallAsync(), CkRemoteCallAsync(), CkRemoteNodeBranchCallAsync(), ampi::winAccumulate(), ampi::winGet(), ampi::winLock(), ampi::winPut(), and ampi::winUnlock().
| CkFutureID CkCreateAttachedFutureSend | ( | void * | msg, | |
| int | ep, | |||
| CkArrayID | id, | |||
| CkArrayIndex | idx, | |||
| void(*)(CkArrayID, CkArrayIndex, void *, int, int) | fptr, | |||
| int | size | |||
| ) |
Definition at line 324 of file ckfutures.C.
References createFuture(), IGetControlClass::iget_request(), envelope::setRef(), TheIGetControlClass, and UsrToEnv().
| void * CkWaitReleaseFuture | ( | CkFutureID | futNum | ) |
Definition at line 350 of file ckfutures.C.
References CkReleaseFutureID(), CkWaitFutureID(), IGetControlClass::iget_free(), IGetControlClass::iget_resend(), and TheIGetControlClass.
Referenced by AMPI_Alltoall2(), CkRemoteBranchCall(), CkRemoteCall(), CkRemoteNodeBranchCall(), and ampi::winIGetWait().
| void CkSendToFutureID | ( | CkFutureID | futNum, | |
| void * | m, | |||
| int | PE | |||
| ) |
Definition at line 388 of file ckfutures.C.
References envelope::setRef(), and UsrToEnv().
Referenced by CkSendToFuture(), win_obj::lock(), win_obj::unlock(), ampi::winRemoteAccumulate(), ampi::winRemoteGet(), and ampi::winRemotePut().
| void CkSendToFuture | ( | CkFuture | fut, | |
| void * | msg | |||
| ) |
Definition at line 396 of file ckfutures.C.
References CkSendToFutureID(), _CkFuture::id, and _CkFuture::pe.
| CkSemaID CkSemaCreate | ( | void | ) |
| void* CkSemaWait | ( | CkSemaID | id | ) |
| void CkSemaSignal | ( | CkSemaID | id, | |
| void * | m | |||
| ) |
| void CkSemaDestroy | ( | CkSemaID | id | ) |
| PUPbytes | ( | CkFuture | ) |
| CkFutureID CkCreateAttachedFutureSend | ( | void * | msg, | |
| int | ep, | |||
| struct CkArrayID | id, | |||
| CkArrayIndex | idx, | |||
| void(*)(struct CkArrayID, CkArrayIndex, void *, int, int) | fptr, | |||
| int size | CK_MSGOPTIONAL | |||
| ) |
Definition at line 256 of file ckfutures.C.
int _CkFuture::pe [inherited] |
1.5.5