|
17 | 17 | #endif |
18 | 18 |
|
19 | 19 | S32 syscall (OSIF_SYSCALLS fn, U32 arg1, U32 arg2, U32 arg3, U32 arg4, U32 arg5); |
20 | | -INT os_thread_create (void (*startLocation)(), bool isKernelMode); |
21 | | -INT os_process_create (void* startLocation, SIZE binaryLengthBytes, bool isKernelMode); |
22 | | -UINT os_get_tick_period_us(); |
23 | | -bool os_process_is_yield_requested(); |
24 | | -bool os_process_is_child_exited (UINT* exitCode); |
| 20 | +INT cm_thread_create (void (*startLocation)(), bool isKernelMode); |
| 21 | +INT cm_process_create (void* startLocation, SIZE binaryLengthBytes, bool isKernelMode); |
| 22 | +UINT cm_get_tick_period_us(); |
| 23 | +bool cm_process_is_yield_requested(); |
| 24 | +bool cm_process_is_child_exited (UINT* exitCode); |
25 | 25 |
|
26 | | -static inline UINT os_tickcount_to_microsec(UINT tick) |
| 26 | +static inline UINT cm_tickcount_to_microsec(UINT tick) |
27 | 27 | { |
28 | | - return ((tick)*os_get_tick_period_us()); |
| 28 | + return ((tick)*cm_get_tick_period_us()); |
29 | 29 | } |
30 | 30 |
|
31 | | -static inline void os_yield() |
| 31 | +static inline void cm_process_yield() |
32 | 32 | { |
33 | 33 | syscall (OSIF_SYSCALL_YIELD_PROCESS, 0, 0, 0, 0, 0); |
34 | 34 | } |
35 | 35 |
|
36 | | -static inline void os_process_kill(UINT code) |
| 36 | +static inline void cm_process_kill(UINT code) |
37 | 37 | { |
38 | 38 | syscall (OSIF_SYSCALL_KILL_PROCESS, code, 0, 0, 0, 0); |
39 | 39 | } |
40 | 40 |
|
41 | | -static inline void os_putstr (char* text) |
| 41 | +static inline void cm_putstr (char* text) |
42 | 42 | { |
43 | 43 | syscall (OSIF_SYSCALL_CONSOLE_WRITELN, (PTR)text, 0, 0, 0, 0); |
44 | 44 | } |
45 | 45 |
|
46 | | -static inline U32 os_process_get_pid() |
| 46 | +static inline U32 cm_process_get_pid() |
47 | 47 | { |
48 | 48 | return (U32)syscall (OSIF_SYSCALL_PROCESS_GETPID, 0, 0, 0, 0, 0); |
49 | 49 | } |
50 | 50 |
|
51 | | -static inline U32 os_get_tickcount() |
| 51 | +static inline U32 cm_get_tickcount() |
52 | 52 | { |
53 | 53 | return (U32)syscall (OSIF_SYSCALL_TIMER_GET_TICKCOUNT, 0, 0, 0, 0, 0); |
54 | 54 | } |
55 | 55 |
|
56 | | -static inline Handle os_window_create (const char* title) |
| 56 | +static inline Handle cm_window_create (const char* title) |
57 | 57 | { |
58 | 58 | return (Handle)syscall (OSIF_SYSCALL_WINDOW_CREATE, (PTR)title, 0, 0, 0, 0); |
59 | 59 | } |
60 | 60 |
|
61 | | -static inline U32 os_window_destory (Handle h) |
| 61 | +static inline U32 cm_window_destory (Handle h) |
62 | 62 | { |
63 | 63 | return (U32)syscall (OSIF_SYSCALL_WINDOW_DESTORY, (U32)h, 0, 0, 0, 0); |
64 | 64 | } |
65 | 65 |
|
66 | | -static inline void* os_process_get_datamem_start() |
| 66 | +static inline void* cm_process_get_datamem_start() |
67 | 67 | { |
68 | 68 | return (void*)syscall (OSIF_SYSCALL_PROCESS_GET_DATAMEM_START, 0, 0, 0, 0, 0); |
69 | 69 | } |
70 | 70 |
|
71 | | -static inline void* os_window_flush_graphics() |
| 71 | +static inline void* cm_window_flush_graphics() |
72 | 72 | { |
73 | 73 | return (void*)syscall (OSIF_SYSCALL_WINDOW_FLUSH_GRAPHICS, 0, 0, 0, 0, 0); |
74 | 74 | } |
75 | 75 |
|
76 | | -static inline bool os_window_getFB (Handle h, OSIF_WindowFrameBufferInfo* wfb) |
| 76 | +static inline bool cm_window_getFB (Handle h, OSIF_WindowFrameBufferInfo* wfb) |
77 | 77 | { |
78 | 78 | return syscall (OSIF_SYSCALL_WINDOW_GET_WINDOW_FB, (U32)h, (PTR)wfb, 0, 0, 0); |
79 | 79 | } |
80 | 80 |
|
81 | | -static inline bool os_process_pop_event (OSIF_ProcessEvent* e) |
| 81 | +static inline bool cm_process_pop_event (OSIF_ProcessEvent* e) |
82 | 82 | { |
83 | 83 | return syscall (OSIF_SYSCALL_POP_PROCESS_EVENT, (PTR)e, 0, 0, 0, 0); |
84 | 84 | } |
0 commit comments