Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

gm_blocking_receive.c File Reference

#include "gm_call_trace.h"
#include "gm_cmp64.h"
#include "gm_compiler.h"
#include "gm_debug.h"
#include "gm_internal.h"
#include "gm_set_alarm.h"

Functions

GM_ENTRY_POINT gm_recv_event_t * gm_blocking_receive (gm_port_t *p)

Detailed Description


Function Documentation

GM_ENTRY_POINT gm_recv_event_t* gm_blocking_receive gm_port_t *    p
 

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)


Generated on Mon Nov 3 15:39:25 2003 for GM by doxygen1.2.15