POK
|
00001 /* 00002 * POK header 00003 * 00004 * The following file is a part of the POK project. Any modification should 00005 * made according to the POK licence. You CANNOT use this file or a part of 00006 * this file is this part of a file for your own project 00007 * 00008 * For more information on the POK licence, please see our LICENCE FILE 00009 * 00010 * Please follow the coding guidelines described in doc/CODING_GUIDELINES 00011 * 00012 * Copyright (c) 2007-2009 POK team 00013 * 00014 * Created by julien on Mon Jan 19 14:18:51 2009 00015 */ 00016 00017 #include <core/dependencies.h> 00018 00019 #ifdef POK_NEEDS_PARTITIONS 00020 00021 #include <types.h> 00022 #include <errno.h> 00023 #include <core/syscall.h> 00024 00025 typedef enum 00026 { 00027 POK_PARTITION_MODE_INIT_COLD = 1, 00028 POK_PARTITION_MODE_INIT_WARM = 2, 00029 POK_PARTITION_MODE_NORMAL = 3, 00030 POK_PARTITION_MODE_IDLE = 4, 00031 POK_PARTITION_MODE_RESTART = 5, 00032 POK_PARTITION_MODE_STOPPED = 6, 00033 }pok_partition_mode_t; 00034 00035 00036 #define pok_partition_set_mode(mode) pok_syscall2(POK_SYSCALL_PARTITION_SET_MODE,(uint32_t)mode,0) 00037 00038 #define pok_current_partition_get_id(id) pok_syscall2(POK_SYSCALL_PARTITION_GET_ID,(uint32_t)id,0) 00039 00040 #define pok_current_partition_get_period(period) pok_syscall2(POK_SYSCALL_PARTITION_GET_PERIOD,(uint32_t)period,0) 00041 00042 #define pok_current_partition_get_duration(duration) pok_syscall2(POK_SYSCALL_PARTITION_GET_DURATION,(uint32_t)duration,0) 00043 00044 #define pok_current_partition_get_lock_level(lock_level) pok_syscall2(POK_SYSCALL_PARTITION_GET_LOCK_LEVEL,(uint32_t)lock_level,0) 00045 00046 #define pok_current_partition_get_operating_mode(op_mode) pok_syscall2(POK_SYSCALL_PARTITION_GET_OPERATING_MODE,(uint32_t)op_mode,0) 00047 00048 #define pok_current_partition_get_start_condition(start_condition) pok_syscall2(POK_SYSCALL_PARTITION_GET_START_CONDITION,(uint32_t)start_condition,0) 00049 #endif