|
gm_blocking_receive() blocks until there is a receive event and then returns a pointer to the event. If no send is immediately available, this call suspends the current process until a receive event is available. As an optimization for applications with one CPU per CPU-intensive thread, this function polls for receives for one millisecond before sleeping the process, so it is not suited for machines running more than one performance critical process or thread on the machine. -
Return values:
-
GM_SUCCESS |
Operation completed successfully. |
GM_NO_RECV_EVENT |
Handle all flushed alarm events, which the user never needs to know about, and which must not cause my_alarm to be cancelled or reset. |
GM_FLUSHED_ALARM_EVENT |
Intercept my_alarm. |
GM_ALARM_EVENT |
If our alarm went off, block. Be careful to not handle any other alarms at this time since we are not passing the GM_ALARM_EVENT to the user and we want to maintain the semantics that user alarms are called only inside gm_unknown() when it is called by the user. |
-
Parameters:
-
p |
(IN) The GM port in use. |
-
Author:
-
Glenn Brown
-
Version:
-
GM_API_VERSION (as defined in gm.h)
|