AGM Library Developer's Reference Manual (6321-13): Function Reference
(Page 14 of 14 in this chapter)
agmSignalMuxHandle
Description
- Puts an artificial message in the AG message queue and signals the mux handle returned by agmOpenDriver.
Prototype
DWORD agmSignalMuxHandle ( AGMHD agmhd,
WORD code,
WORD board
- agmhd Handle returned by agmOpen, or AGM_NULL_AGMHD if one is not available.
- code A message code.
- board A board number.
Return Values
Details
- This function places an artificial message in the AG driver queue. This, in turn, causes the associated mux handle (returned by agmOpenDriver) to be signaled. This message contains code as parms[0] and board as parms[1]. When agmGetAGMessage retrieves this message, it recognizes it as artificial and returns AGMERR_SIGNALLED instead of SUCCESS.
- If agmhd is set to AGM_NULL_AGMHD, agmSignalMuxHandle tries to open a new channel to the driver in order to enqueue the message.
- agmSignalMuxHandle can be used to wake a thread that is waiting on the muxhandle.
See Also
- agmGetAGMessage, agmOpen, agmOpenDriver
Example
#define SHUTDOWN 1
DWORD stop_monitor (AGMHD agmhd)
{
if (agmSignalMuxHandle (AGM_NULL_AGMHD, SHUTDOWN, 0) != SUCCESS)
{
printf ("agmSignalMuxHandle failed.");
return AGMERR_FAILURE;
}
return SUCCESS;
}
(Page 14 of 14 in this chapter)
tech_support@nmss.com
Copyright © 1998, Natural MicroSystems, Inc. All rights
reserved.