1/** 2 * \file 3 * \brief Header file for triggers. 4 */ 5 6/* 7 * Copyright (c) 2011, ETH Zurich. 8 * All rights reserved. 9 * 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. 13 */ 14 15#ifndef OCTOPUS_TRIGGER_H_ 16#define OCTOPUS_TRIGGER_H_ 17 18#include <barrelfish/barrelfish.h> 19 20#include <octopus/definitions.h> 21 22#define NOP_TRIGGER (octopus_trigger_t){ /*in_case*/ 0, /*send_to*/ 0, \ 23 /*m*/ 0, /*trigger*/ 0, /*st*/ 0 } 24 25#define TRIGGER_ALWAYS (OCT_PERSIST | OCT_ON_SET | OCT_ON_DEL | OCT_ALWAYS_SET) 26 27typedef void(*trigger_handler_fn)(octopus_mode_t mode, const char* record, void* state); 28octopus_trigger_t oct_mktrigger(errval_t, octopus_binding_type_t, octopus_mode_t, 29 trigger_handler_fn, void*); 30errval_t oct_remove_trigger(octopus_trigger_id_t); 31errval_t oct_trigger_existing_and_watch(const char*, 32 trigger_handler_fn, void*, 33 octopus_trigger_id_t*); 34 35 36#endif /* OCTOPUS_TRIGGER_H_ */ 37