|
Converse provides a scheduler for message delivery: methods can be registered to the scheduler, and then messages allocated through CmiAlloc can be sent to the correspondent method in a remote processor. This is done through the converse header (which has few common fields, but is architecture dependent).
In converse the CsdScheduleForever() routine will run an infinite while loop that looks for available messages to processes from the message queue. Messages in the queue are dequeued by the CsdNextMessage() routine. When a message is taken from the queue it is then passed into CmiHandleMessage() which calls the handler associated with the message.
Incoming messages that are destined for Charm++ will be passed to the charm scheduling routines.
Definition at line 13 of file conv-lists.C.
| typedef void* CdsFifo |
Definition at line 16 of file conv-lists.h.
| void CsdBeginIdle | ( | void | ) |
| void CsdStillIdle | ( | void | ) |
| void CsdEndIdle | ( | void | ) |
Definition at line 1343 of file convcore.c.
References CcdRaiseCondition().
Referenced by CsdScheduleCount(), and CsdScheduleForever().
| void CmiHandleMessage | ( | void * | msg | ) |
Takes a message and calls its corresponding handler.
Definition at line 1366 of file convcore.c.
Referenced by CldHopHandler(), CldTokenHandler(), CmiDeliverSpecificMsg(), CmiImmediateMsgHandler(), ComlibNotifyMigrationDone(), CpdDeliverSingleMessage(), CpdFreezeModeScheduler(), and handleDebugMessage().
| void CmiDeliversInit | ( | ) |
Definition at line 1401 of file convcore.c.
References CsdScheduler().
Referenced by BgShutdown(), and BroadcastShutdown().
| CpvDeclare | ( | void * | , | |
| CsdObjQueue | ||||
| ) |
| void CsdSchedulerState_new | ( | CsdSchedulerState_t * | s | ) |
Definition at line 1410 of file convcore.c.
References CsdSchedulerState_t::gridQ, CsdSchedulerState_t::localCounter, CsdSchedulerState_t::localQ, CsdSchedulerState_t::nodeLock, CsdSchedulerState_t::nodeQ, CsdSchedulerState_t::objQ, and CsdSchedulerState_t::schedQ.
Referenced by CpdFreezeModeScheduler().
| void* CsdNextMessage | ( | CsdSchedulerState_t * | s | ) |
Dequeue and return the next message from the message queue.
Definition at line 1429 of file convcore.c.
References CdsFifo_Dequeue(), CmiGetNonLocal(), CmiGetNonLocalNodeQ(), CmiLock(), CmiUnlock(), CqsDequeue(), CqsEmpty(), CqsGetPriority(), CqsPrioGT(), CsdSchedulerState_t::gridQ, CsdSchedulerState_t::localCounter, CsdSchedulerState_t::localQ, msg, CsdSchedulerState_t::nodeLock, CsdSchedulerState_t::nodeQ, CsdSchedulerState_t::objQ, and CsdSchedulerState_t::schedQ.
Referenced by CpdFreezeModeScheduler(), CsdScheduleCount(), CsdScheduleForever(), and CsdSchedulePoll().
Definition at line 1482 of file convcore.c.
References CsdScheduleCount(), CsdScheduleForever(), and CsdSchedulePoll().
Referenced by _CkExit(), CkLocalNodeBranch(), CmiCallMain(), CmiDeliverMsgs(), CommunicationServer(), ConverseInit(), ConverseRunPE(), CthStandinCode(), KillOnAllSigs(), and threadInit().
| void CkClearAllArrayElements | ( | ) |
| void machine_OffloadAPIProgress | ( | ) |
Referenced by CsdScheduleForever(), and KillOnAllSigs().
| void CsdScheduleForever | ( | void | ) |
The main scheduler loop that repeatedly executes messages from a queue, forever.
Definition at line 1522 of file convcore.c.
References CsdEndIdle(), CsdNextMessage(), machine_OffloadAPIProgress(), and msg.
Referenced by CsdScheduler().
Definition at line 1577 of file convcore.c.
References CsdEndIdle(), CsdNextMessage(), and msg.
Referenced by CsdScheduler().
| void CsdSchedulePoll | ( | void | ) |
Definition at line 1596 of file convcore.c.
References CsdNextMessage(), and msg.
Referenced by CsdScheduler().
| void CmiDeliverSpecificMsg | ( | int | handler | ) |
Definition at line 1611 of file convcore.c.
References CdsFifo_Dequeue(), CdsFifo_Enqueue(), CmiGetNonLocal(), CmiHandleMessage(), and msg.
Referenced by _propMapInit(), CmiInitCPUAffinity(), and CmiInitCPUTopology().
| CpvStaticDeclare | ( | CthThread | , | |
| CthMainThread | ||||
| ) |
| CpvStaticDeclare | ( | CthThread | , | |
| CthSchedulingThread | ||||
| ) |
| CpvStaticDeclare | ( | CthThread | , | |
| CthSleepingStandins | ||||
| ) |
| CpvStaticDeclare | ( | int | , | |
| CthResumeNormalThreadIdx | ||||
| ) |
| CpvStaticDeclare | ( | int | , | |
| CthResumeSchedulingThreadIdx | ||||
| ) |
| void CthStandinCode | ( | ) |
Definition at line 1667 of file convcore.c.
References CsdScheduler().
Referenced by CthSuspendSchedulingThread().
| static CthThread CthSuspendNormalThread | ( | ) | [static] |
| void CthEnqueueSchedulingThread | ( | CthThreadToken * | token, | |
| int | s, | |||
| int | pb, | |||
| unsigned int * | prio | |||
| ) |
Definition at line 1755 of file convcore.c.
Referenced by CthResumeSchedulingThread(), CthSchedInit(), and CthSuspendSchedulingThread().
| CthThread CthSuspendSchedulingThread | ( | ) |
Definition at line 1681 of file convcore.c.
References CthCreate(), CthEnqueueSchedulingThread(), CthGetNext(), CthSetStrategy(), and CthStandinCode().
Referenced by CthSchedInit().
| void CthResumeNormalThread | ( | CthThreadToken * | token | ) |
Definition at line 1698 of file convcore.c.
References CthResume(), CthTraceResume(), free(), and CthThreadToken::thread.
Referenced by CthSchedInit(), workThreadInfo::run(), and commThreadInfo::run().
| void CthResumeSchedulingThread | ( | CthThreadToken * | token | ) |
Definition at line 1726 of file convcore.c.
References CthEnqueueSchedulingThread(), CthGetToken(), CthResume(), CthSelf(), CthSetNext(), CthTraceResume(), and CthThreadToken::thread.
Referenced by CthSchedInit().
| void CthEnqueueNormalThread | ( | CthThreadToken * | token, | |
| int | s, | |||
| int | pb, | |||
| unsigned int * | prio | |||
| ) |
| void CthSetStrategyDefault | ( | CthThread | t | ) |
Definition at line 1762 of file convcore.c.
References CthEnqueueNormalThread(), CthSetStrategy(), and CthSuspendNormalThread().
Referenced by CpmThread2(), CpmThreadSize2(), Cpthread_create3(), and CthThreadBaseInit().
| void CthSchedInit | ( | ) |
Definition at line 1769 of file convcore.c.
References CmiRegisterHandler(), CthEnqueueSchedulingThread(), CthResumeNormalThread(), CthResumeSchedulingThread(), CthSelf(), CthSetStrategy(), and CthSuspendSchedulingThread().
Referenced by ConverseCommonInit().
| void CsdInit | ( | char ** | argv | ) |
Definition at line 1789 of file convcore.c.
References CdsFifo_Create(), CmiCreateLock(), CmiGetArgIntDesc(), CmiLock(), CmiMyRank(), CmiNodeAllBarrier(), and CqsCreate().
Referenced by ConverseCommonInit().
| CdsFifo CdsFifo_Create | ( | void | ) |
Definition at line 15 of file conv-lists.C.
Referenced by ConverseInit(), CpdInit(), Cpthread_cond_init(), Cpthread_mutex_init(), CkObjectMsgQ::create(), CsdInit(), McInit(), OtherNode_init(), threadInit(), and waitqd_QDChare::waitQD().
| void CdsFifo_Enqueue | ( | CdsFifo | q, | |
| void * | elt | |||
| ) |
Definition at line 17 of file conv-lists.C.
Referenced by _enqObjQueue(), CMI_VMI_Common_Receive(), CMI_VMI_RDMA_Get_Notification_Handler(), CMI_VMI_Send_Spanning_Children(), CMI_VMI_Stream_Completion_Handler(), CmiAsyncBroadcastAllFn(), CmiAsyncSendFn(), CmiDeliverSpecificMsg(), CmiFreeBroadcastAllFn(), CmiFreeSendFn(), CmiGetNonLocal(), CmiPushPE(), CmiSendSelf(), CmiSyncBroadcastAllFn(), CmiSyncSendFn(), CmiSyncSendPersistent(), CommunicationServer(), CpdFreezeModeScheduler(), Cpthread_cond_wait(), Cpthread_mutex_lock(), Cpthread_mutex_trylock(), KillOnAllSigs(), McQueueAddToBack(), CkObjectMsgQ::process(), and waitqd_QDChare::waitQD().
| void * CdsFifo_Dequeue | ( | CdsFifo | q | ) |
Definition at line 18 of file conv-lists.C.
Referenced by CmiDeliverSpecificMsg(), CmiGetNonLocal(), CpdDeliverSingleMessage(), CpdFreezeModeScheduler(), Cpthread_cond_broadcast(), Cpthread_cond_signal(), CsdNextMessage(), McQueueRemoveFromFront(), waitqd_QDChare::onQD(), CkObjectMsgQ::process(), and processFutureMessages().
| void CdsFifo_Push | ( | CdsFifo | q, | |
| void * | elt | |||
| ) |
Definition at line 19 of file conv-lists.C.
| void * CdsFifo_Pop | ( | CdsFifo | q | ) |
Definition at line 20 of file conv-lists.C.
Referenced by Cpthread_cond_wait(), and Cpthread_mutex_unlock().
| void CdsFifo_Destroy | ( | CdsFifo | q | ) |
Definition at line 21 of file conv-lists.C.
Referenced by ConverseExit(), Cpthread_cond_destroy(), Cpthread_mutex_destroy(), waitqd_QDChare::onQD(), and CkObjectMsgQ::~CkObjectMsgQ().
| void ** CdsFifo_Enumerate | ( | CdsFifo | q | ) |
Definition at line 23 of file conv-lists.C.
Referenced by CmiNotifyIdle(), CmiNotifyStillIdle(), CpdDeliverSingleMessage(), CpdFreezeModeScheduler(), Cpthread_mutex_destroy(), Cpthread_mutex_trylock(), waitqd_QDChare::onQD(), processFutureMessages(), and PumpMsgsBlocking().
| void * CdsFifo_Peek | ( | CdsFifo | q | ) |
Definition at line 24 of file conv-lists.C.
Referenced by Cpthread_cond_wait(), Cpthread_mutex_lock(), and Cpthread_mutex_unlock().
Definition at line 27 of file conv-lists.C.
Referenced by CpdList_localQ::getLength(), CkObjectMsgQ::length(), processFutureMessages(), and CpdList_localQ::pup().
1.5.5