
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 117 of file ckfutures.C.
References FutureState::array, array, FutureState::freelist, and Future_s::next.
Referenced by _futuresModuleInit(), and createFuture().

| static int createFuture | ( | void | ) | [inline, static] |
Definition at line 131 of file ckfutures.C.
References addedFutures(), FutureState::array, FutureState::freelist, handle, 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 154 of file ckfutures.C.
References Converse::CkMyPe(), createFuture(), _CkFuture::id, and _CkFuture::pe.

| void CkReleaseFutureID | ( | CkFutureID | handle | ) |
Definition at line 162 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 170 of file ckfutures.C.
References FutureState::array, and Future_s::ready.
Referenced by CkProbeFuture().

| void * CkWaitFutureID | ( | CkFutureID | handle | ) |
Definition at line 177 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(), and CkWaitVoidFuture().


| void CkReleaseFuture | ( | CkFuture | fut | ) |
Definition at line 200 of file ckfutures.C.
References CkReleaseFutureID(), and _CkFuture::id.

Definition at line 205 of file ckfutures.C.
References CkProbeFutureID(), and _CkFuture::id.

| void * CkWaitFuture | ( | CkFuture | fut | ) |
Definition at line 210 of file ckfutures.C.
References CkWaitFutureID(), and _CkFuture::id.

| void CkWaitVoidFuture | ( | CkFutureID | handle | ) |
Definition at line 215 of file ckfutures.C.
References CkFreeMsg(), and CkWaitFutureID().

| static void setFuture | ( | CkFutureID | handle, | |
| void * | pointer | |||
| ) | [static] |
Definition at line 220 of file ckfutures.C.
References FutureState::array, CthAwaken(), CthGetNext(), Future_s::ready, PUP::t, Future_s::value, and Future_s::waiters.
Referenced by FutureBOC::SetFuture().


| void _futuresModuleInit | ( | void | ) |
Definition at line 235 of file ckfutures.C.
References addedFutures(), array, and malloc().
Referenced by _initCharm().


| CkFutureID CkRemoteBranchCallAsync | ( | int | ep, | |
| void * | m, | |||
| CkGroupID | group, | |||
| int | PE | |||
| ) |
Definition at line 263 of file ckfutures.C.
References CkCreateAttachedFuture(), and CkSendMsgBranch().
Referenced by CkRemoteBranchCall().


Definition at line 271 of file ckfutures.C.
References CkRemoteBranchCallAsync(), and CkWaitReleaseFuture().

| CkFutureID CkRemoteNodeBranchCallAsync | ( | int | ep, | |
| void * | m, | |||
| CkGroupID | group, | |||
| int | node | |||
| ) |
Definition at line 278 of file ckfutures.C.
References CkCreateAttachedFuture(), and CkSendMsgNodeBranch().
Referenced by CkRemoteNodeBranchCall().


Definition at line 286 of file ckfutures.C.
References CkRemoteNodeBranchCallAsync(), and CkWaitReleaseFuture().

| CkFutureID CkRemoteCallAsync | ( | int | ep, | |
| void * | m, | |||
| const CkChareID * | ID | |||
| ) |
Definition at line 293 of file ckfutures.C.
References CkCreateAttachedFuture(), and CkSendMsg().
Referenced by CkRemoteCall().


Definition at line 301 of file ckfutures.C.
References CkRemoteCallAsync(), and CkWaitReleaseFuture().

| CkFutureID CkCreateAttachedFuture | ( | void * | msg | ) |
Definition at line 308 of file ckfutures.C.
References createFuture(), envelope::setRef(), and UsrToEnv().
Referenced by CkRemoteBranchCallAsync(), CkRemoteCallAsync(), and CkRemoteNodeBranchCallAsync().


| CkFutureID CkCreateAttachedFutureSend | ( | void * | msg, | |
| int | ep, | |||
| CkArrayID | id, | |||
| CkArrayIndex | idx, | |||
| void(*)(CkArrayID, CkArrayIndex, void *, int, int) | fptr, | |||
| int | size | |||
| ) |
Definition at line 315 of file ckfutures.C.
References createFuture(), IGetControlClass::iget_request(), envelope::setRef(), TheIGetControlClass, and UsrToEnv().

| void * CkWaitReleaseFuture | ( | CkFutureID | futNum | ) |
Definition at line 341 of file ckfutures.C.
References CkReleaseFutureID(), CkWaitFutureID(), IGetControlClass::iget_free(), IGetControlClass::iget_resend(), and TheIGetControlClass.
Referenced by CkRemoteBranchCall(), CkRemoteCall(), and CkRemoteNodeBranchCall().


| void CkSendToFutureID | ( | CkFutureID | futNum, | |
| void * | m, | |||
| int | PE | |||
| ) |
Definition at line 379 of file ckfutures.C.
References envelope::setRef(), and UsrToEnv().
Referenced by CkSendToFuture().


| void CkSendToFuture | ( | CkFuture | fut, | |
| void * | msg | |||
| ) |
Definition at line 386 of file ckfutures.C.
References CkSendToFutureID(), _CkFuture::id, and _CkFuture::pe.

| CkSemaID CkSemaCreate | ( | void | ) |
Definition at line 391 of file ckfutures.C.
References Converse::CkMyPe().

| void* CkSemaWait | ( | CkSemaID | id | ) |
Definition at line 399 of file ckfutures.C.
References Converse::CkMyPe().

Definition at line 409 of file ckfutures.C.
References Converse::CkMyPe().

| void CkSemaSignal | ( | CkSemaID | id, | |
| void * | m | |||
| ) |
Definition at line 419 of file ckfutures.C.
References envelope::setRef(), and UsrToEnv().

| void CkSemaDestroy | ( | CkSemaID | id | ) |
Definition at line 426 of file ckfutures.C.
References Converse::CkMyPe().

| 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 247 of file ckfutures.C.
int _CkFuture::pe [inherited] |
1.5.5