POK
partition.h
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Mon Jan 19 14:18:51 2009
15  */
16 
17 #include <core/dependencies.h>
18 
19 #ifdef POK_NEEDS_PARTITIONS
20 
21 #include <types.h>
22 #include <errno.h>
23 #include <core/syscall.h>
24 
25 typedef enum
26 {
27  POK_PARTITION_MODE_INIT_COLD = 1,
28  POK_PARTITION_MODE_INIT_WARM = 2,
29  POK_PARTITION_MODE_NORMAL = 3,
30  POK_PARTITION_MODE_IDLE = 4,
31  POK_PARTITION_MODE_RESTART = 5,
32  POK_PARTITION_MODE_STOPPED = 6,
33 }pok_partition_mode_t;
34 
35 
36 #define pok_partition_set_mode(mode) pok_syscall2(POK_SYSCALL_PARTITION_SET_MODE,(uint32_t)mode,0)
37 
38 #define pok_current_partition_get_id(id) pok_syscall2(POK_SYSCALL_PARTITION_GET_ID,(uint32_t)id,0)
39 
40 #define pok_current_partition_get_period(period) pok_syscall2(POK_SYSCALL_PARTITION_GET_PERIOD,(uint32_t)period,0)
41 
42 #define pok_current_partition_get_duration(duration) pok_syscall2(POK_SYSCALL_PARTITION_GET_DURATION,(uint32_t)duration,0)
43 
44 #define pok_current_partition_get_lock_level(lock_level) pok_syscall2(POK_SYSCALL_PARTITION_GET_LOCK_LEVEL,(uint32_t)lock_level,0)
45 
46 #define pok_current_partition_get_operating_mode(op_mode) pok_syscall2(POK_SYSCALL_PARTITION_GET_OPERATING_MODE,(uint32_t)op_mode,0)
47 
48 #define pok_current_partition_get_start_condition(start_condition) pok_syscall2(POK_SYSCALL_PARTITION_GET_START_CONDITION,(uint32_t)start_condition,0)
49 #endif