1/** 2 * \file 3 * \brief Userlevel capability predicates (to be generated by Hamlet). 4 */ 5 6/* 7 * Copyright (c) 2009, 2010, 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 CAP_PREDICATES_H 16#define CAP_PREDICATES_H 17 18#include <sys/cdefs.h> 19 20#include <barrelfish/debug.h> 21 22__BEGIN_DECLS 23 24struct capability; 25enum objtype; 26 27bool is_ancestor(struct capability *, struct capability *); 28bool is_copy(struct capability *, struct capability *); 29bool is_well_founded(enum objtype, enum objtype); 30bool is_equal_type(enum objtype, enum objtype); 31int8_t compare_caps(struct capability *, struct capability *, bool); 32genpaddr_t get_address(struct capability *); 33gensize_t get_size(struct capability *); 34uint8_t get_type_root(enum objtype); 35 36// XXX: Hack to enable cap_predicates.c to build in userland 37static inline lpaddr_t mem_to_local_phys(lvaddr_t addr) 38{ 39 USER_PANIC("NYI"); 40 return 0; 41} 42 43__END_DECLS 44 45#endif 46 47