Barrelfish
Functions
trigger.h File Reference

Header file for triggers. More...

Functions

errval_t oct_remove_trigger (octopus_trigger_id_t)
 Removes a trigger in the octopus server. More...
 
errval_t oct_trigger_existing_and_watch (const char *, trigger_handler_fn, void *, octopus_trigger_id_t *)
 

Detailed Description

Header file for triggers.

Function Documentation

errval_t oct_remove_trigger ( octopus_trigger_id_t  trigger_id)

Removes a trigger in the octopus server.

In any case a valid watch id is specified this causes a trigger event to be sent with the OCT_REMOVED flag set. After this event it's safe to clean up any memory associated with the event handler.

Parameters
trigger_idID of trigger we want to remove
Return values
SYS_ERR_OK
OCT_INVALID_ID
errval_t oct_trigger_existing_and_watch ( const char *  query,
trigger_handler_fn  event_handler,
void *  state,
octopus_trigger_id_t *  tid 
)

Watches for a query of records and calls the trigger function for all records found and subsequent records registered.

Parameters
[in]queryRecords to watch for.
[in]event_handlerHandler function to call.
[in]stateAdditional state for handler function
[out]tidTrigger id.
Return values
SYS_ERR_OKTrigger registered, handler fn called for all current records.