Writing Monitors for the Event Monitoring Service (December 1999)
Chapter 3 127
Creating a Resource Monitor
Processing a Terminate Event
case RM_MONITOR_REQUEST_EVENT:
send_monitor_reply(obj);
break;
case RM_RESOURCE_UPDATE_EVENT:
update_resource(obj);
break;
case RM_SELECT_EVENT:
/***********************************************************************/
/* Since we do not set the select_data, we will not get this event. */
/***********************************************************************/
break;
case RM_TERMINATE_EVENT:
terminate();
break;
case RM_TIMEOUT_EVENT:
/***********************************************************************/
/* Since we do not set the select_data, we will not get this event. */
/***********************************************************************/
break;
case RM_UNREGISTER_EVENT:
/***********************************************************************/
/* All we need to do is destroy the object (below). */
/***********************************************************************/
break;
default:
/***********************************************************************/
/* Ignore other events */
/***********************************************************************/
break;
}
rm_destroy(obj);
}
return;
} /* end process_requests */