ConverseScheduler
[Converse]

Collaboration diagram for ConverseScheduler:
The portion of Converse responsible for scheduling the execution of incoming messages. More...


Files

file  convcore.c
 converse main core
file  converse.h
 Main Converse header file.
file  conv-lists.C
 Declarations of CdsFifo* routines.
file  conv-lists.h
 Definitions of CdsFifo routines.

Typedefs

typedef CkQ< void * > _Fifo
typedef void * CdsFifo

Functions

void CsdBeginIdle (void)
void CsdStillIdle (void)
void CsdEndIdle (void)
void CmiHandleMessage (void *msg)
 Takes a message and calls its corresponding handler.
void CmiDeliversInit ()
int CmiDeliverMsgs (int maxmsgs)
 CpvDeclare (void *, CsdObjQueue)
void CsdSchedulerState_new (CsdSchedulerState_t *s)
void * CsdNextMessage (CsdSchedulerState_t *s)
 Dequeue and return the next message from the message queue.
int CsdScheduler (int maxmsgs)
void CkClearAllArrayElements ()
void machine_OffloadAPIProgress ()
void CsdScheduleForever (void)
 The main scheduler loop that repeatedly executes messages from a queue, forever.
int CsdScheduleCount (int maxmsgs)
void CsdSchedulePoll (void)
void CmiDeliverSpecificMsg (int handler)
 CpvStaticDeclare (CthThread, CthMainThread)
 CpvStaticDeclare (CthThread, CthSchedulingThread)
 CpvStaticDeclare (CthThread, CthSleepingStandins)
 CpvStaticDeclare (int, CthResumeNormalThreadIdx)
 CpvStaticDeclare (int, CthResumeSchedulingThreadIdx)
void CthStandinCode ()
static CthThread CthSuspendNormalThread ()
void CthEnqueueSchedulingThread (CthThreadToken *token, int, int, unsigned int *)
CthThread CthSuspendSchedulingThread ()
void CthResumeNormalThread (CthThreadToken *token)
void CthResumeSchedulingThread (CthThreadToken *token)
void CthEnqueueNormalThread (CthThreadToken *token, int s, int pb, unsigned int *prio)
void CthSetStrategyDefault (CthThread t)
void CthSchedInit ()
void CsdInit (char **argv)
CdsFifo CdsFifo_Create (void)
CdsFifo CdsFifo_Create_len (int len)
void CdsFifo_Enqueue (CdsFifo q, void *elt)
void * CdsFifo_Dequeue (CdsFifo q)
void CdsFifo_Push (CdsFifo q, void *elt)
void * CdsFifo_Pop (CdsFifo q)
void CdsFifo_Destroy (CdsFifo q)
void ** CdsFifo_Enumerate (CdsFifo q)
int CdsFifo_Empty (CdsFifo q)
void * CdsFifo_Peek (CdsFifo q)
int CdsFifo_Length (CdsFifo q)

Variables

int _exitHandlerIdx

Detailed Description

The portion of Converse responsible for scheduling the execution of incoming messages.

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.


Typedef Documentation

typedef CkQ<void*> _Fifo

Definition at line 13 of file conv-lists.C.

typedef void* CdsFifo

Definition at line 16 of file conv-lists.h.


Function Documentation

void CsdBeginIdle ( void   ) 

Definition at line 1331 of file convcore.c.

References CcdCallBacks(), and CcdRaiseCondition().

void CsdStillIdle ( void   ) 

Definition at line 1338 of file convcore.c.

References CcdRaiseCondition().

void CsdEndIdle ( void   ) 

Definition at line 1343 of file convcore.c.

References CcdRaiseCondition().

Referenced by CsdScheduleCount(), and CsdScheduleForever().

void CmiHandleMessage ( void *  msg  ) 

void CmiDeliversInit (  ) 

Definition at line 1397 of file convcore.c.

Referenced by ConverseCommonInit().

int CmiDeliverMsgs ( int  maxmsgs  ) 

Definition at line 1401 of file convcore.c.

References CsdScheduler().

Referenced by BgShutdown(), and BroadcastShutdown().

CpvDeclare ( void *  ,
CsdObjQueue   
)

void CsdSchedulerState_new ( CsdSchedulerState_t s  ) 

void* CsdNextMessage ( CsdSchedulerState_t s  ) 

int CsdScheduler ( int  maxmsgs  ) 

void CkClearAllArrayElements (  ) 

void machine_OffloadAPIProgress (  ) 

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

int CsdScheduleCount ( int  maxmsgs  ) 

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  ) 

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]

Definition at line 1673 of file convcore.c.

Referenced by CthSetStrategyDefault().

void CthEnqueueSchedulingThread ( CthThreadToken token,
int  s,
int  pb,
unsigned int prio 
)

CthThread CthSuspendSchedulingThread (  ) 

void CthResumeNormalThread ( CthThreadToken token  ) 

void CthResumeSchedulingThread ( CthThreadToken token  ) 

void CthEnqueueNormalThread ( CthThreadToken token,
int  s,
int  pb,
unsigned int prio 
)

Definition at line 1748 of file convcore.c.

Referenced by CthSetStrategyDefault().

void CthSetStrategyDefault ( CthThread  t  ) 

void CthSchedInit (  ) 

void CsdInit ( char **  argv  ) 

CdsFifo CdsFifo_Create ( void   ) 

CdsFifo CdsFifo_Create_len ( int  len  ) 

Definition at line 16 of file conv-lists.C.

Referenced by McQueueCreate().

void CdsFifo_Enqueue ( CdsFifo  q,
void *  elt 
)

void * CdsFifo_Dequeue ( CdsFifo  q  ) 

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  ) 

void ** CdsFifo_Enumerate ( CdsFifo  q  ) 

Definition at line 22 of file conv-lists.C.

Referenced by CpdList_localQ::pup().

int CdsFifo_Empty ( CdsFifo  q  ) 

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

int CdsFifo_Length ( CdsFifo  q  ) 


Variable Documentation

Definition at line 119 of file init.C.


Generated on Mon Nov 23 07:56:03 2009 for Charm++ by  doxygen 1.5.5