Added cache_buster syscall
[akaros.git] / user / roslib / src / syswrapper.c
1 #ifdef __DEPUTY__
2 #pragma nodeputy
3 #endif
4
5 #include <types.h>
6 #include <lib.h>
7 #include <ros/syscall.h>
8
9 void null()
10 {
11         sys_null();
12 }
13
14 error_t null_async(async_desc_t** desc)
15 {
16         error_t e;
17         syscall_desc_t* sysdesc;
18         if (e = get_all_desc(desc, &sysdesc))
19                 return e;
20         return sys_null_async(sysdesc);
21 }
22
23 void cache_buster(uint32_t num_writes, uint32_t num_pages, uint32_t flags)
24 {
25         sys_cache_buster(num_writes, num_pages, flags);
26 }
27
28 error_t cache_buster_async(async_desc_t** desc, uint32_t num_writes,
29                            uint32_t num_pages, uint32_t flags)
30 {
31         error_t e;
32         syscall_desc_t* sysdesc;
33         if (e = get_all_desc(desc, &sysdesc))
34                 return e;
35         return sys_cache_buster_async(sysdesc, num_writes, num_pages, flags);
36 }
37
38 uint32_t getcpuid(void)
39 {
40         return sys_getcpuid();
41 }