/
boot_deps.h
40 lines (30 loc) · 988 Bytes
/
boot_deps.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <print.h>
#undef assert
#define assert(node) do { if (unlikely(!(node))) { debug_print("assert error in @ "); *((int *)0) = 0;} } while(0)
#include <mem_mgr.h>
#include <sched.h>
#include <cos_alloc.h>
#include <cobj_format.h>
/*
* Abstraction layer around 1) synchronization, 2) scheduling and
* thread creation, and 3) memory operations.
*/
/* synchronization... */
#define LOCK() if (sched_component_take(cos_spd_id())) BUG();
#define UNLOCK() if (sched_component_release(cos_spd_id())) BUG();
/* scheduling/thread operations... */
#define __sched_create_thread_default sched_create_thread_default
/* memory operations... */
#define __local_mman_get_page mman_get_page
#define __local_mman_alias_page mman_alias_page
#include <cinfo.h>
#include <cos_vect.h>
static void
boot_deps_init(void) { return; }
static void
boot_deps_save_hp(spdid_t spdid, void *hp)
{
cinfo_add_heap_pointer(cos_spd_id(), spdid, hp);
}
static void
boot_deps_run(void) { return; }