PPL Logo

arch/util/machine-commthd-util.C File Reference

Go to the source code of this file.

Functions

 CsvDeclare (CMIQueue, notifyCommThdMsgBuffer)
 Usage: First: define a function that needs to be invoked on comm thread.
 CpvDeclare (int, notifyCommThdHdlr)
static void commThdHandleNotification (CmiNotifyCommThdMsg *msg)
void CmiInitNotifyCommThdScheme (void)
CmiNotifyCommThdMsgCmiCreateNotifyCommThdMsg (CmiCommThdFnPtr fn, int numParams, void *params, int toKeep)
void CmiFreeNotifyCommThdMsg (CmiNotifyCommThdMsg *msg)
void CmiResetNotifyCommThdMsg (CmiNotifyCommThdMsg *msg, CmiCommThdFnPtr fn, int numParams, void *params, int toKeep)
void CmiPushImmediateMsg (void *)
void CmiNotifyCommThd (CmiNotifyCommThdMsg *msg)


Function Documentation

CsvDeclare ( CMIQueue  ,
notifyCommThdMsgBuffer   
)

Usage: First: define a function that needs to be invoked on comm thread.

E.g. void CommThdSayHello(int numParams, void *params) { int src = *(int *)params; CkPrintf("Notification from source %d\n", src); }

Second: create a notification msg and push it to comm thread. E.g. int *argv = (int *)malloc(sizeof(int)*1); *argv = SRCIDX; CmiNotifyCommThdMsg *one = CmiCreateNotifyCommThdMsg(CommThdSayHello, 1, (void *)(argv), 0); CmiNotifyCommThd(one); Since we have set "toKeep" 0, the msg itself with the input arguments will be freed by the comm thread after the msg is processed. Otherwise, the developer has to be responsible for freeing such message.

CpvDeclare ( int  ,
notifyCommThdHdlr   
)

static void commThdHandleNotification ( CmiNotifyCommThdMsg msg  )  [static]

Definition at line 24 of file machine-commthd-util.C.

References CmiFreeNotifyCommThdMsg(), CmiNotifyCommThdMsg::fn, CmiNotifyCommThdMsg::numParams, CmiNotifyCommThdMsg::params, and CmiNotifyCommThdMsg::toKeep.

Referenced by CmiInitNotifyCommThdScheme().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiInitNotifyCommThdScheme ( void   ) 

Definition at line 30 of file machine-commthd-util.C.

References CmiMyRank(), CmiNodeAllBarrier(), CmiRegisterHandler(), commThdHandleNotification(), and malloc().

Referenced by ConverseRunPE().

Here is the call graph for this function:

Here is the caller graph for this function:

CmiNotifyCommThdMsg* CmiCreateNotifyCommThdMsg ( CmiCommThdFnPtr  fn,
int  numParams,
void *  params,
int  toKeep 
)

Definition at line 50 of file machine-commthd-util.C.

References CmiNotifyCommThdMsg::fn, malloc(), CmiNotifyCommThdMsg::numParams, CmiNotifyCommThdMsg::params, and CmiNotifyCommThdMsg::toKeep.

Here is the call graph for this function:

void CmiFreeNotifyCommThdMsg ( CmiNotifyCommThdMsg msg  ) 

Definition at line 64 of file machine-commthd-util.C.

References free(), and CmiNotifyCommThdMsg::params.

Referenced by commThdHandleNotification().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiResetNotifyCommThdMsg ( CmiNotifyCommThdMsg msg,
CmiCommThdFnPtr  fn,
int  numParams,
void *  params,
int  toKeep 
)

void CmiNotifyCommThd ( CmiNotifyCommThdMsg msg  ) 

Definition at line 80 of file machine-commthd-util.C.

References CmiPushImmediateMsg().

Here is the call graph for this function:


Generated on Mon Sep 21 07:56:42 2020 for Charm++ by  doxygen 1.5.5