Changeset 9a426d1f in mainline
- Timestamp:
- 2011-08-28T18:48:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 19fc04c
- Parents:
- dc6b148
- Files:
-
- 3 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
abi/include/syscall.h
rdc6b148 r9a426d1f 89 89 SYS_UNREGISTER_IRQ, 90 90 91 SYS_SYSINFO_GET_ TAG,91 SYS_SYSINFO_GET_VAL_TYPE, 92 92 SYS_SYSINFO_GET_VALUE, 93 93 SYS_SYSINFO_GET_DATA_SIZE, -
abi/include/sysinfo.h
rdc6b148 r9a426d1f 37 37 #define ABI_SYSINFO_H_ 38 38 39 #include <abi/proc/task.h> 40 #include <abi/proc/thread.h> 41 39 42 /** Number of load components */ 40 43 #define LOAD_STEPS 3 … … 44 47 #define EXC_NAME_BUFLEN 20 45 48 46 /** Thread states */ 49 /** Item value type 50 * 51 */ 47 52 typedef enum { 48 /** It is an error, if thread is found in this state. */ 49 Invalid, 50 /** State of a thread that is currently executing on some CPU. */ 51 Running, 52 /** Thread in this state is waiting for an event. */ 53 Sleeping, 54 /** State of threads in a run queue. */ 55 Ready, 56 /** Threads are in this state before they are first readied. */ 57 Entering, 58 /** After a thread calls thread_exit(), it is put into Exiting state. */ 59 Exiting, 60 /** Threads that were not detached but exited are Lingering. */ 61 Lingering 62 } state_t; 53 SYSINFO_VAL_UNDEFINED = 0, /**< Undefined value */ 54 SYSINFO_VAL_VAL = 1, /**< Constant numeric value */ 55 SYSINFO_VAL_DATA = 2, /**< Constant binary data */ 56 SYSINFO_VAL_FUNCTION_VAL = 3, /**< Generated numeric value */ 57 SYSINFO_VAL_FUNCTION_DATA = 4 /**< Generated binary data */ 58 } sysinfo_item_val_type_t; 63 59 64 60 /** Statistics about a single CPU -
kernel/generic/include/ipc/ipc.h
rdc6b148 r9a426d1f 36 36 #define KERN_IPC_H_ 37 37 38 #include <abi/ipc/ipc.h>39 38 #include <synch/spinlock.h> 40 39 #include <synch/mutex.h> 41 40 #include <synch/waitq.h> 41 #include <abi/ipc/ipc.h> 42 #include <abi/proc/task.h> 42 43 #include <typedefs.h> 43 44 -
kernel/generic/include/sysinfo/sysinfo.h
rdc6b148 r9a426d1f 38 38 #include <typedefs.h> 39 39 #include <str.h> 40 #include <abi/sysinfo.h> 40 41 41 42 /** Framebuffer info exported flags */ 42 43 extern bool fb_exported; 43 44 /** Item value type45 *46 */47 typedef enum {48 SYSINFO_VAL_UNDEFINED = 0, /**< Undefined value */49 SYSINFO_VAL_VAL = 1, /**< Constant numeric value */50 SYSINFO_VAL_DATA = 2, /**< Constant binary data */51 SYSINFO_VAL_FUNCTION_VAL = 3, /**< Generated numeric value */52 SYSINFO_VAL_FUNCTION_DATA = 4 /**< Generated binary data */53 } sysinfo_item_val_type_t;54 44 55 45 /** Subtree type … … 145 135 extern void sysinfo_dump(sysinfo_item_t *); 146 136 147 extern sysarg_t sys_sysinfo_get_ tag(void *, size_t);137 extern sysarg_t sys_sysinfo_get_val_type(void *, size_t); 148 138 extern sysarg_t sys_sysinfo_get_value(void *, size_t, void *); 149 139 extern sysarg_t sys_sysinfo_get_data_size(void *, size_t, void *); -
kernel/generic/include/typedefs.h
rdc6b148 r9a426d1f 39 39 #include <arch/common.h> 40 40 #include <arch/types.h> 41 #include <abi/bool.h> 41 42 42 43 #define NULL ((void *) 0) … … 61 62 typedef void (* function)(); 62 63 63 typedef uint8_t bool;64 typedef uint64_t thread_id_t;65 typedef uint64_t task_id_t;66 64 typedef uint32_t container_id_t; 67 65 -
kernel/generic/src/syscall/syscall.c
rdc6b148 r9a426d1f 181 181 182 182 /* Sysinfo syscalls. */ 183 (syshandler_t) sys_sysinfo_get_ tag,183 (syshandler_t) sys_sysinfo_get_val_type, 184 184 (syshandler_t) sys_sysinfo_get_value, 185 185 (syshandler_t) sys_sysinfo_get_data_size, -
kernel/generic/src/sysinfo/sysinfo.c
rdc6b148 r9a426d1f 661 661 * 662 662 */ 663 sysarg_t sys_sysinfo_get_ tag(void *path_ptr, size_t path_size)663 sysarg_t sys_sysinfo_get_val_type(void *path_ptr, size_t path_size) 664 664 { 665 665 /* -
uspace/app/sysinfo/sysinfo.c
rdc6b148 r9a426d1f 51 51 int rc; 52 52 char *ipath; 53 sysinfo_item_ tag_t tag;53 sysinfo_item_val_type_t tag; 54 54 55 55 if (argc != 2) { … … 60 60 ipath = argv[1]; 61 61 62 tag = sysinfo_get_ tag(ipath);62 tag = sysinfo_get_val_type(ipath); 63 63 64 64 /* Silence warning */ … … 75 75 case SYSINFO_VAL_DATA: 76 76 rc = print_item_data(ipath); 77 break; 78 default: 79 printf("Error: Sysinfo item '%s' with unknown value type.\n", 80 ipath); 81 rc = 2; 77 82 break; 78 83 } -
uspace/app/trace/syscalls.c
rdc6b148 r9a426d1f 75 75 [SYS_UNREGISTER_IRQ] = { "unregister_irq", 2, V_ERRNO }, 76 76 77 [SYS_SYSINFO_GET_ TAG] = { "sysinfo_get_tag", 2, V_INTEGER },77 [SYS_SYSINFO_GET_VAL_TYPE] = { "sysinfo_get_val_type", 2, V_INTEGER }, 78 78 [SYS_SYSINFO_GET_VALUE] = { "sysinfo_get_value", 3, V_ERRNO }, 79 79 [SYS_SYSINFO_GET_DATA_SIZE] = { "sysinfo_get_data_size", 3, V_ERRNO }, -
uspace/lib/c/generic/sysinfo.c
rdc6b148 r9a426d1f 47 47 * 48 48 */ 49 sysinfo_item_ tag_t sysinfo_get_tag(const char *path)49 sysinfo_item_val_type_t sysinfo_get_val_type(const char *path) 50 50 { 51 return (sysinfo_item_ tag_t) __SYSCALL2(SYS_SYSINFO_GET_TAG,51 return (sysinfo_item_val_type_t) __SYSCALL2(SYS_SYSINFO_GET_VAL_TYPE, 52 52 (sysarg_t) path, (sysarg_t) str_size(path)); 53 53 } -
uspace/lib/c/include/bool.h
rdc6b148 r9a426d1f 37 37 38 38 #include <libarch/types.h> 39 #include <abi/bool.h> 39 40 40 41 #define false 0 41 42 #define true 1 42 43 typedef uint8_t bool;44 43 45 44 #endif -
uspace/lib/c/include/sysinfo.h
rdc6b148 r9a426d1f 36 36 #define LIBC_SYSINFO_H_ 37 37 38 #include <libc.h> 38 #include <sys/types.h> 39 #include <bool.h> 40 #include <abi/sysinfo.h> 39 41 40 /** Sysinfo value types 41 * 42 */ 43 typedef enum { 44 SYSINFO_VAL_UNDEFINED = 0, 45 SYSINFO_VAL_VAL = 1, 46 SYSINFO_VAL_DATA = 2 47 } sysinfo_item_tag_t; 48 49 extern sysinfo_item_tag_t sysinfo_get_tag(const char *); 42 extern sysinfo_item_val_type_t sysinfo_get_val_type(const char *); 50 43 extern int sysinfo_get_value(const char *, sysarg_t *); 51 44 extern void *sysinfo_get_data(const char *, size_t *); -
uspace/lib/c/include/task.h
rdc6b148 r9a426d1f 37 37 38 38 #include <sys/types.h> 39 40 typedef uint64_t task_id_t; 39 #include <abi/proc/task.h> 41 40 42 41 typedef enum { -
uspace/lib/c/include/thread.h
rdc6b148 r9a426d1f 38 38 #include <libarch/thread.h> 39 39 #include <sys/types.h> 40 41 typedef uint64_t thread_id_t; 40 #include <abi/proc/thread.h> 42 41 43 42 extern int thread_create(void (*)(void *), void *, const char *, thread_id_t *);
Note:
See TracChangeset
for help on using the changeset viewer.