x86: vmm: Rework VMRESUME logic
[akaros.git] / kern / include / address_range.h
1 /* Copyright (c) 2015 Google Inc
2  * Davide Libenzi <dlibenzi@google.com>
3  * See LICENSE for details.
4  */
5
6 #pragma once
7
8 #include <sys/types.h>
9 #include <stdio.h>
10
11 #define ADDRESS_RANGE(s, e) { .start = (s), .end = (e) }
12
13 struct address_range {
14         uintptr_t start;
15         uintptr_t end;
16 };
17
18 int address_range_validate(const struct address_range *ars, size_t count);
19 int address_range_init(struct address_range *ars, size_t count);
20 const struct address_range *address_range_find(const struct address_range *ars,
21                                                                                            size_t count, uintptr_t addr);