1 /*
2  * Copyright (C) 2015-2017 Alibaba Group Holding Limited
3  */
4 
5 #ifndef PORT_H
6 #define PORT_H
7 
8 cpu_cpsr_t cpu_intrpt_save(void);
9 void   cpu_intrpt_restore(cpu_cpsr_t cpsr);
10 void   cpu_intrpt_switch(void);
11 void   cpu_task_switch(void);
12 void   cpu_first_task_start(void);
13 void  *cpu_task_stack_init(cpu_stack_t *base, size_t size, void *arg, task_entry_t entry);
14 
cpu_cur_get(void)15 RHINO_INLINE uint8_t cpu_cur_get(void)
16 {
17     return 0;
18 }
19 
20 #define CPSR_ALLOC()                cpu_cpsr_t cpsr
21 #define RHINO_CPU_INTRPT_DISABLE()  do{cpsr = cpu_intrpt_save();}while(0)
22 #define RHINO_CPU_INTRPT_ENABLE()   do{cpu_intrpt_restore(cpsr);}while(0)
23 
24 #endif /* PORT_H */
25 
26