xref: /xnu-10002.61.3/tests/rump.h (revision 0f4c859e951fba394238ab619495c4e1d54d0f34)
1*0f4c859eSApple OSS Distributions // Copyright (c) 2020 Apple Computer, Inc. All rights reserved.
2*0f4c859eSApple OSS Distributions 
3*0f4c859eSApple OSS Distributions #include <stdlib.h>
4*0f4c859eSApple OSS Distributions #include <os/atomic_private.h>
5*0f4c859eSApple OSS Distributions 
6*0f4c859eSApple OSS Distributions #define kheap_alloc(h, s, f) calloc(1, s)
7*0f4c859eSApple OSS Distributions #define kfree(p, s) free(p)
8*0f4c859eSApple OSS Distributions #define kalloc_type(t, f) calloc(1, sizeof(t))
9*0f4c859eSApple OSS Distributions #define kfree_type(t, p) free(p)
10*0f4c859eSApple OSS Distributions #define kalloc_data(s, f) calloc(1, s)
11*0f4c859eSApple OSS Distributions #define kfree_data(p, s) free(p)
12*0f4c859eSApple OSS Distributions #define panic(...) T_ASSERT_FAIL(__VA_ARGS__)
13*0f4c859eSApple OSS Distributions #define PE_i_can_has_debugger(...) true
14*0f4c859eSApple OSS Distributions #define SECURITY_READ_ONLY_LATE(X) X
15*0f4c859eSApple OSS Distributions #define __startup_func
16*0f4c859eSApple OSS Distributions 
17*0f4c859eSApple OSS Distributions #define ml_get_cpu_count() 6
18