1/** 2 * \file 3 * \brief Prototypes for use by flounder-generated stubs 4 */ 5 6/* 7 * Copyright (c) 2010, 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 __FLOUNDER_SUPPORT_H 16#define __FLOUNDER_SUPPORT_H 17 18#include <flounder/flounder.h> 19#include <sys/cdefs.h> 20 21__BEGIN_DECLS 22 23/// State associated with an ongoing generic bind attempt 24struct flounder_generic_bind_attempt { 25 int driver_num; 26 iref_t iref; 27 struct waitset *waitset; 28 void *callback; // XXX: actually interface-specific binding callback type 29 void *st; 30 void *binding; 31 idc_bind_flags_t flags; 32}; 33 34struct waitset_chanstate; 35struct monitor_binding; 36 37extern struct event_closure dummy_event_closure; 38 39void flounder_support_trigger_chan(struct waitset_chanstate *wc); 40errval_t flounder_support_register(struct waitset *ws, 41 struct waitset_chanstate *wc, 42 struct event_closure ec, 43 bool trigger_now); 44void flounder_support_deregister_chan(struct waitset_chanstate *wc); 45void flounder_support_waitset_chanstate_init(struct waitset_chanstate *wc); 46void flounder_support_waitset_chanstate_init_persistent(struct waitset_chanstate *wc); 47void flounder_support_waitset_chanstate_destroy(struct waitset_chanstate *wc); 48struct waitset * flounder_support_get_current_monitor_waitset(struct monitor_binding *mb); 49errval_t flounder_support_change_monitor_waitset(struct monitor_binding *mb, 50 struct waitset *ws); 51void flounder_support_monitor_mutex_enqueue(struct monitor_binding *mb, 52 struct event_queue_node *qn, 53 struct event_closure cl); 54void flounder_support_monitor_mutex_unlock(struct monitor_binding *mb); 55void flounder_support_migrate_notify(struct waitset_chanstate *chan, 56 struct waitset *new_ws); 57 58#if defined(FLOUNDER_DEBUG) 59# include <barrelfish_kpi/dispatcher_shared.h> 60# include <barrelfish/dispatch.h> 61# include <barrelfish/debug.h> 62# define FL_DEBUG(msg...) debug_printf(msg) 63#else 64# define FL_DEBUG(msg...) ((void)0) 65#endif 66 67__END_DECLS 68 69#endif // __FLOUNDER_SUPPORT_H 70