]> git.saurik.com Git - apple/ld64.git/blame - unit-tests/test-cases/kext-basic/mykext.c
ld64-409.12.tar.gz
[apple/ld64.git] / unit-tests / test-cases / kext-basic / mykext.c
CommitLineData
55e3d2f6
A
1#include <mach/mach_types.h>
2
a645023d 3extern void extern_func();
55e3d2f6
A
4
5int my_global = 3;
6extern int extern_global;
7
8kern_return_t mykext_start (kmod_info_t * ki, void * d) {
9 ++my_global;
10 ++extern_global;
a645023d 11 extern_func();
55e3d2f6
A
12 return KERN_SUCCESS;
13}
14
15
16kern_return_t mykext_stop (kmod_info_t * ki, void * d) {
17 --my_global;
18 --extern_global;
19 return KERN_SUCCESS;
20}