24#define B8_OS_INVALID_PID (0)
27#define B8_OS_INVALID_SID (0)
29typedef u64 b8OsCpuCycles;
32#define B8_OS_SCHED_FIFO 1
33#define B8_OS_SCHED_RR 2
34#define B8_OS_SCHED_SPORADIC 3
35#define B8_OS_SCHED_IRQ 4
36#define B8_OS_SCHED_OTHER 5
38#define B8_OS_NOT_USING_IRQ (0xffff)
40#define B8_OS_SEM_WAIT (0)
41#define B8_OS_SEM_TRYWAIT (1)
42#define B8_OS_SEM_TIMEDWAIT (2)
44#define B8_OS_CLOCKID_REALTIME (0x10)
45#define B8_OS_CLOCKID_MONOTONIC (0x11)
46#define B8_OS_CLOCKID_PROCESS_CPUTIME_ID (0x12)
47#define B8_OS_CLOCKID_THREAD_CPUTIME_ID (0x13)
50#define SEM_VALUE_MAX (32767)
52 B8_OS_SYSCALL_NULL = 0,
54 B8_OS_SYSCALL_GET_BRIDGE,
60 B8_OS_SYSCALL_SCHED_YIELD,
68 B8_OS_SYSCALL_SCHED_SLEEP,
83 B8_OS_SYSCALL_THREAD_CREATE,
96 B8_OS_SYSCALL_SET_ERRNO,
102 B8_OS_SYSCALL_GET_ERRNO,
110 B8_OS_SYSCALL_SEM_INIT,
117 B8_OS_SYSCALL_SEM_POST,
128 B8_OS_SYSCALL_SEM_WAIT,
138 B8_OS_SYSCALL_SEM_GETVALUE,
140 B8_OS_SYSCALL_CLOCK_GETRES,
151 B8_OS_SYSCALL_CLOCK_GETTIME,
159 B8_OS_SYSCALL_CLOCK_SETTIME,
166 B8_OS_SYSCALL_THREAD_CREATE_PID=1,
167 B8_OS_SYSCALL_SEM_INIT_SID=1,
168 B8_OS_SYSCALL_SEM_GETVALUE_RESULT=1,
169} b8OsSysCallResultIdx;
212extern b8OsBridgeUsr2Svc* b8OsSysCall( b8OsSysCallNum syscall,u32 arg0,u32 arg1,u32 arg2,u32 arg3,u32 arg4,u32 arg5);
217 b8OsCpuCycles CpuCyclesPerSec;
226 int (*ArchDriverGetTimerIrq)(u16* irq);
227 int (*ArchDriverOnStartTimer)(u32 hz);
228 int (*ArchDriverOnStartCycleCnt)(void);
229 void (*ArchDriverGetCycle)(u32* cyccnt );
230 void (*ArchDriverGetCycleAndClear)(u32* cyccnt );
231 void (*ArchDriverPicDistributor)(u8 enable );
232 void (*ArchDriverGetClockTime)( u64* clock );
235extern int b8OsIsRunning(
void);
Definition semaphore.h:35