Next: Data Reduction
Up: Application Programming Interface
Previous: Memory Allocation
void SMP_Barrier(void);
SUBROUTINE SMP_BARRIER
- synchronizes all processes and
has to be called by each process.
void SMP_Barriern(int b_no, int b_numprocs, int b_procid);
SUBROUTINE SMP_BARRIERN(B_NO, B_NUMPROCS, B_PROCID)
INTEGER B_NO, B_NUMPROCS, B_PROCID
- synchronizes a subset of processes with a numbered barrier.
b_no is the barrier number, ranging from 0 to
MAX_NBARRIER-1,
b_numprocs is the number of processes involved in
the numbered barrier, and b_procid
(between 0 and b_numprocs-1) is a virtual
process id used in this barrier.
This function must be called with the same b_no and
b_numprocs by those processes involved in the barrier,
and the virtual process id (b_procid) must be uniquely defined
within the subset.
MAX_NBARRIER (≥ 4) is implementation defined.
- error code:
SMP_ERR_NPROC, SMP_ERR_NODE
int SMP_Testsignal(int node, int tid);
INTEGER FUNCTION SMP_TESTSIGNAL(NODE, TID)
INTEGER NODE, TID
- tests if a node is ready for signal from the current node.
If
node < 0, signal to any node.
Returns the node number the signal will actually be sent to.
The call ensures any previous signal sent to node from the current
node has been taken.
The second argument tid tags the signal to a particular thread.
- error code:
SMP_ERR_NODE, SMP_ERR_TID
void SMP_Setsignal(int node, int tid);
SUBROUTINE SMP_SETSIGNAL(NODE, TID)
INTEGER NODE, TID
- sets a signal for node after
SMP_Testsignal is called.
The second argument tid tags the signal to a particular thread.
- error code:
SMP_ERR_NODE, SMP_ERR_TID,
SMP_ERR_MNODE
int SMP_Signal(int node, int tid);
INTEGER FUNCTION SMP_SIGNAL(NODE, TID)
INTEGER NODE, TID
- sends a signal to node. If
node < 0, signal to any node.
Returns the node number the signal will actually be sent to.
The second argument tid tags the signal to a particular thread.
This function is equivalent to SMP_Testsignal +
SMP_Setsignal.
- error code:
SMP_ERR_NODE, SMP_ERR_TID
int SMP_Testwait(int node, int tid);
INTEGER FUNCTION SMP_TESTWAIT(NODE, TID)
INTEGER NODE, TID
- waits for a signal from node.
If
node < 0, signal from any node.
Returns the node number the signal is actually from.
The second argument tid tags the signal to a particular thread.
- error code:
SMP_ERR_NODE, SMP_ERR_TID
void SMP_Ackwait(int node, int tid);
SUBROUTINE SMP_ACKWAIT(NODE, TID)
INTEGER NODE, TID
- acknowledges the reception of a signal from node after
SMP_Testwait is called.
The second argument tid tags the signal to a particular thread.
- error code:
SMP_ERR_NODE, SMP_ERR_TID,
SMP_ERR_MNODE
int SMP_Wait(int node, int tid);
INTEGER FUNCTION SMP_WAIT(NODE, TID)
INTEGER NODE, TID
- waits for a signal from node.
If
node < 0, signal from any node.
Returns the node number the signal is actually from.
The second argument tid tags the signal to a particular thread.
This function is equivalent to SMP_Testwait +
SMP_Ackwait.
- error code:
SMP_ERR_NODE, SMP_ERR_TID
void SMP_Setlock(void);
SUBROUTINE SMP_SETLOCK
- waits for the SMPlib global lock and set the lock when it is
available.
void SMP_Unsetlock(void);
SUBROUTINE SMP_UNSETLOCK
- releases the SMPlib global lock after it was set.
Next: Data Reduction
Up: Application Programming Interface
Previous: Memory Allocation
Haoqiang Jin
2005-08-10