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