3 * \brief Header file for triggers.
7 * Copyright (c) 2011, ETH Zurich.
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
15 #ifndef OCTOPUS_TRIGGER_H_
16 #define OCTOPUS_TRIGGER_H_
18 #include <barrelfish/barrelfish.h>
20 #include <octopus/definitions.h>
22 #define NOP_TRIGGER (octopus_trigger_t){ /*in_case*/ 0, /*send_to*/ 0, \
23 /*m*/ 0, /*trigger*/ 0, /*st*/ 0 }
25 #define TRIGGER_ALWAYS (OCT_PERSIST | OCT_ON_SET | OCT_ON_DEL | OCT_ALWAYS_SET)
27 typedef void(*trigger_handler_fn)(octopus_mode_t mode, const char* record, void* state);
28 octopus_trigger_t oct_mktrigger(errval_t, octopus_binding_type_t, octopus_mode_t,
29 trigger_handler_fn, void*);
30 errval_t oct_remove_trigger(octopus_trigger_id_t);
31 errval_t oct_trigger_existing_and_watch(const char*,
32 trigger_handler_fn, void*,
33 octopus_trigger_id_t*);
36 #endif /* OCTOPUS_TRIGGER_H_ */