1/*
2 * Copyright (c) 2012, ETH Zurich.
3 * All rights reserved.
4 *
5 * This file is distributed under the terms in the attached LICENSE file.
6 * If you do not find this file, copies can be found by writing to:
7 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group.
8 */
9
10#ifndef LIBMDB_MDB_H
11#define LIBMDB_MDB_H
12
13#include <sys/cdefs.h>
14
15#include <barrelfish/types.h>
16#include <errors/errno.h> // For errval_t
17#include <barrelfish_kpi/capabilities.h>
18#include <mdb/types.h>
19
20__BEGIN_DECLS
21
22struct capability;
23struct cte;
24
25void set_init_mapping(struct cte *dest_start, size_t num);
26bool has_descendants(struct cte *cte);
27bool has_ancestors(struct cte *cte);
28bool has_copies(struct cte *cte);
29struct cte *mdb_find_ancestor(struct cte *cte);
30void remove_mapping(struct cte *cte);
31errval_t mdb_get_copy(struct capability *cap, struct capability **ret);
32bool mdb_is_sane(void);
33void mdb_set_relations(struct cte *cte, uint8_t relations, uint8_t mask);
34void mdb_print_counters(coreid_t core);
35
36__END_DECLS
37
38#endif // LIBMDB_MDB_H
39