Changeset 925a21e in mainline for uspace/lib/c/include
- Timestamp:
- 2011-09-24T14:20:29Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5bf76c1
- Parents:
- 867e2555 (diff), 1ab4aca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/include
- Files:
-
- 2 added
- 2 deleted
- 31 edited
- 1 moved
-
adt/list.h (modified) (4 diffs)
-
as.h (modified) (2 diffs)
-
async.h (modified) (6 diffs)
-
async_obsolete.h (deleted)
-
bool.h (modified) (1 diff)
-
cfg.h (added)
-
ddi.h (modified) (1 diff)
-
devman.h (modified) (3 diffs)
-
elf/elf.h (modified) (1 diff)
-
elf/elf_load.h (modified) (2 diffs)
-
errno.h (modified) (2 diffs)
-
event.h (modified) (1 diff)
-
io/color.h (modified) (1 diff)
-
io/console.h (modified) (3 diffs)
-
io/screenbuffer.h (deleted)
-
ipc/bd.h (modified) (1 diff)
-
ipc/common.h (modified) (2 diffs)
-
ipc/devman.h (modified) (2 diffs)
-
ipc/ipc.h (modified) (2 diffs)
-
ipc/loc.h (moved) (moved from uspace/lib/c/include/ipc/devmap.h ) (2 diffs)
-
ipc/services.h (modified) (1 diff)
-
ipc/vfs.h (modified) (3 diffs)
-
libc.h (modified) (1 diff)
-
loader/loader.h (modified) (2 diffs)
-
loader/pcb.h (modified) (2 diffs)
-
loc.h (added)
-
rtld/elf_dyn.h (modified) (1 diff)
-
stats.h (modified) (1 diff)
-
str.h (modified) (3 diffs)
-
sys/stat.h (modified) (2 diffs)
-
syscall.h (modified) (1 diff)
-
sysinfo.h (modified) (1 diff)
-
task.h (modified) (2 diffs)
-
thread.h (modified) (1 diff)
-
udebug.h (modified) (1 diff)
-
vfs/vfs.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/list.h
r867e2555 r925a21e 72 72 73 73 #define assert_link_not_used(link) \ 74 assert(( link)->prev == NULL && (link)->next == NULL)74 assert(((link)->prev == NULL) && ((link)->next == NULL)) 75 75 76 76 /** Initialize doubly-linked circular list link … … 158 158 static inline void list_remove(link_t *link) 159 159 { 160 link->next->prev = link->prev; 161 link->prev->next = link->next; 160 if ((link->prev != NULL) && (link->next != NULL)) { 161 link->next->prev = link->prev; 162 link->prev->next = link->next; 163 } 164 162 165 link_initialize(link); 163 166 } … … 170 173 * 171 174 */ 172 static inline int list_empty( list_t *list)175 static inline int list_empty(const list_t *list) 173 176 { 174 177 return (list->head.next == &list->head); … … 183 186 * 184 187 */ 185 static inline link_t *list_first( list_t *list)188 static inline link_t *list_first(const list_t *list) 186 189 { 187 190 return ((list->head.next == &list->head) ? NULL : list->head.next); -
uspace/lib/c/include/as.h
r867e2555 r925a21e 37 37 38 38 #include <sys/types.h> 39 #include <abi/mm/as.h> 39 40 #include <task.h> 40 #include <kernel/mm/as.h>41 41 #include <libarch/config.h> 42 42 … … 60 60 extern void *set_maxheapsize(size_t); 61 61 extern void *as_get_mappable_page(size_t); 62 extern int as_get_physical_mapping( void *, uintptr_t *);62 extern int as_get_physical_mapping(const void *, uintptr_t *); 63 63 64 64 #endif -
uspace/lib/c/include/async.h
r867e2555 r925a21e 42 42 #include <ipc/common.h> 43 43 #include <fibril.h> 44 #include <fibril_synch.h>45 44 #include <sys/time.h> 46 45 #include <atomic.h> … … 96 95 } exch_mgmt_t; 97 96 98 /** Session data */ 99 typedef struct { 100 /** List of inactive exchanges */ 101 list_t exch_list; 102 103 /** Exchange management style */ 104 exch_mgmt_t mgmt; 105 106 /** Session identification */ 107 int phone; 108 109 /** First clone connection argument */ 110 sysarg_t arg1; 111 112 /** Second clone connection argument */ 113 sysarg_t arg2; 114 115 /** Third clone connection argument */ 116 sysarg_t arg3; 117 118 /** Exchange mutex */ 119 fibril_mutex_t mutex; 120 121 /** Number of opened exchanges */ 122 atomic_t refcnt; 123 } async_sess_t; 124 125 /** Exchange data */ 126 typedef struct { 127 /** Link into list of inactive exchanges */ 128 link_t sess_link; 129 130 /** Link into global list of inactive exchanges */ 131 link_t global_link; 132 133 /** Session pointer */ 134 async_sess_t *sess; 135 136 /** Exchange identification */ 137 int phone; 138 } async_exch_t; 97 /** Forward declarations */ 98 struct async_exch; 99 struct async_sess; 100 101 typedef struct async_sess async_sess_t; 102 typedef struct async_exch async_exch_t; 139 103 140 104 extern atomic_t threads_in_ipc_wait; … … 176 140 extern int async_wait_timeout(aid_t, sysarg_t *, suseconds_t); 177 141 178 extern fid_t async_new_connection( sysarg_t, sysarg_t, ipc_callid_t,142 extern fid_t async_new_connection(task_id_t, sysarg_t, ipc_callid_t, 179 143 ipc_call_t *, async_client_conn_t, void *); 180 144 … … 186 150 extern void async_set_client_data_destructor(async_client_data_dtor_t); 187 151 extern void *async_get_client_data(void); 152 extern void *async_get_client_data_by_id(task_id_t); 153 extern void async_put_client_data_by_id(task_id_t); 188 154 189 155 extern void async_set_client_connection(async_client_conn_t); … … 371 337 372 338 /* 339 * FIXME These functions just work around problems with parallel exchange 340 * management. Proper solution needs to be implemented. 341 */ 342 void async_sess_args_set(async_sess_t *sess, sysarg_t, sysarg_t, sysarg_t); 343 344 /* 373 345 * User-friendly wrappers for async_share_in_start(). 374 346 */ … … 477 449 extern async_sess_t *async_callback_receive_start(exch_mgmt_t, ipc_call_t *); 478 450 451 extern int async_state_change_start(async_exch_t *, sysarg_t, sysarg_t, 452 sysarg_t, async_exch_t *); 453 extern bool async_state_change_receive(ipc_callid_t *, sysarg_t *, sysarg_t *, 454 sysarg_t *); 455 extern int async_state_change_finalize(ipc_callid_t, async_exch_t *); 456 457 extern void *async_remote_state_acquire(async_sess_t *); 458 extern void async_remote_state_update(async_sess_t *, void *); 459 extern void async_remote_state_release(async_sess_t *); 460 extern void async_remote_state_release_exchange(async_exch_t *); 461 479 462 #endif 480 463 -
uspace/lib/c/include/bool.h
r867e2555 r925a21e 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/ddi.h
r867e2555 r925a21e 37 37 38 38 #include <sys/types.h> 39 #include < kernel/ddi/irq.h>39 #include <abi/ddi/irq.h> 40 40 #include <task.h> 41 41 -
uspace/lib/c/include/devman.h
r867e2555 r925a21e 38 38 39 39 #include <ipc/devman.h> 40 #include <ipc/loc.h> 40 41 #include <async.h> 41 42 #include <bool.h> … … 48 49 extern int devman_add_function(const char *, fun_type_t, match_id_list_t *, 49 50 devman_handle_t, devman_handle_t *); 51 extern int devman_remove_function(devman_handle_t); 52 extern int devman_drv_fun_online(devman_handle_t); 53 extern int devman_drv_fun_offline(devman_handle_t); 50 54 51 55 extern async_sess_t *devman_device_connect(exch_mgmt_t, devman_handle_t, … … 54 58 unsigned int); 55 59 56 extern int devman_ device_get_handle(const char *, devman_handle_t *,60 extern int devman_fun_get_handle(const char *, devman_handle_t *, 57 61 unsigned int); 58 extern int devman_device_get_handle_by_class(const char *, const char *, 59 devman_handle_t *, unsigned int); 60 extern int devman_get_device_path(devman_handle_t, char *, size_t); 62 extern int devman_fun_get_child(devman_handle_t, devman_handle_t *); 63 extern int devman_dev_get_functions(devman_handle_t, devman_handle_t **, 64 size_t *); 65 extern int devman_fun_get_name(devman_handle_t, char *, size_t); 66 extern int devman_fun_get_path(devman_handle_t, char *, size_t); 67 extern int devman_fun_online(devman_handle_t); 68 extern int devman_fun_offline(devman_handle_t); 61 69 62 extern int devman_add_device_to_class(devman_handle_t, const char *); 70 extern int devman_add_device_to_category(devman_handle_t, const char *); 71 extern int devman_fun_sid_to_handle(service_id_t, devman_handle_t *); 63 72 64 73 #endif -
uspace/lib/c/include/elf/elf.h
r867e2555 r925a21e 36 36 #define LIBC_ELF_H_ 37 37 38 #include <kernel/lib/elf.h> 38 #include <sys/types.h> 39 #include <abi/elf.h> 40 #include <libarch/elf.h> 39 41 40 42 #endif -
uspace/lib/c/include/elf/elf_load.h
r867e2555 r925a21e 38 38 #define ELF_LOAD_H_ 39 39 40 #include <arch/elf.h>41 40 #include <elf/elf.h> 42 41 #include <sys/types.h> … … 48 47 #define EE_OK 0 /* No error */ 49 48 #define EE_INVALID 1 /* Invalid ELF image */ 50 #define EE_MEMORY 2 /* Cannot allocate address space */49 #define EE_MEMORY 2 /* Cannot allocate address space */ 51 50 #define EE_INCOMPATIBLE 3 /* ELF image is not compatible with current architecture */ 52 51 #define EE_UNSUPPORTED 4 /* Non-supported ELF (e.g. dynamic ELFs) */ -
uspace/lib/c/include/errno.h
r867e2555 r925a21e 36 36 #define LIBC_ERRNO_H_ 37 37 38 #include < kernel/errno.h>38 #include <abi/errno.h> 39 39 #include <fibril.h> 40 40 … … 55 55 #define EIO (-265) 56 56 #define EMLINK (-266) 57 #define ENXIO (-267) 57 58 58 59 /** Bad checksum. */ -
uspace/lib/c/include/event.h
r867e2555 r925a21e 36 36 #define LIBC_EVENT_H_ 37 37 38 #include <kernel/ipc/event_types.h> 38 #include <abi/ipc/event.h> 39 #include <libarch/types.h> 39 40 40 41 extern int event_subscribe(event_type_t, sysarg_t); 42 extern int event_task_subscribe(event_task_type_t, sysarg_t); 41 43 extern int event_unmask(event_type_t); 44 extern int event_task_unmask(event_task_type_t); 42 45 43 46 #endif -
uspace/lib/c/include/io/color.h
r867e2555 r925a21e 44 44 COLOR_MAGENTA = 5, 45 45 COLOR_YELLOW = 6, 46 COLOR_WHITE = 7, 47 48 CATTR_BRIGHT = 8, 49 CATTR_BLINK = 8 46 COLOR_WHITE = 7 50 47 } console_color_t; 48 49 typedef enum { 50 CATTR_NORMAL = 0, 51 CATTR_BRIGHT = 8, 52 CATTR_BLINK = 16 53 } console_color_attr_t; 51 54 52 55 #endif -
uspace/lib/c/include/io/console.h
r867e2555 r925a21e 37 37 38 38 #include <sys/time.h> 39 #include <io/keycode.h> 39 40 #include <async.h> 40 41 #include <bool.h> … … 42 43 43 44 typedef enum { 44 CONSOLE_C CAP_NONE = 0,45 CONSOLE_C CAP_STYLE,46 CONSOLE_C CAP_INDEXED,47 CONSOLE_C CAP_RGB45 CONSOLE_CAP_NONE = 0, 46 CONSOLE_CAP_STYLE = 1, 47 CONSOLE_CAP_INDEXED = 2, 48 CONSOLE_CAP_RGB = 4 48 49 } console_caps_t; 49 50 … … 76 77 /** Console event structure. */ 77 78 typedef struct { 79 /** List handle */ 80 link_t link; 81 78 82 /** Press or release event. */ 79 83 kbd_event_type_t type; 80 84 81 85 /** Keycode of the key that was pressed or released. */ 82 unsigned int key;86 keycode_t key; 83 87 84 88 /** Bitmask of modifiers held. */ 85 unsigned int mods;89 keymod_t mods; 86 90 87 91 /** The character that was generated or '\0' for none. */ -
uspace/lib/c/include/ipc/bd.h
r867e2555 r925a21e 42 42 BD_GET_NUM_BLOCKS, 43 43 BD_READ_BLOCKS, 44 BD_WRITE_BLOCKS 44 BD_WRITE_BLOCKS, 45 BD_READ_TOC 45 46 } bd_request_t; 46 47 -
uspace/lib/c/include/ipc/common.h
r867e2555 r925a21e 37 37 38 38 #include <sys/types.h> 39 #include <abi/ipc/ipc.h> 39 40 #include <atomic.h> 40 #include < kernel/ipc/ipc.h>41 #include <task.h> 41 42 42 43 #define IPC_FLAG_BLOCKING 0x01 … … 44 45 typedef struct { 45 46 sysarg_t args[IPC_CALL_LEN]; 46 sysarg_t in_task_hash;47 task_id_t in_task_id; 47 48 sysarg_t in_phone_hash; 48 49 } ipc_call_t; -
uspace/lib/c/include/ipc/devman.h
r867e2555 r925a21e 130 130 DEVMAN_CLIENT, 131 131 DEVMAN_CONNECT_TO_DEVICE, 132 DEVMAN_CONNECT_FROM_ DEVMAP,132 DEVMAN_CONNECT_FROM_LOC, 133 133 DEVMAN_CONNECT_TO_PARENTS_DEVICE 134 134 } devman_interface_t; … … 138 138 DEVMAN_ADD_FUNCTION, 139 139 DEVMAN_ADD_MATCH_ID, 140 DEVMAN_ADD_DEVICE_TO_CLASS 141 140 DEVMAN_ADD_DEVICE_TO_CATEGORY, 141 DEVMAN_DRV_FUN_ONLINE, 142 DEVMAN_DRV_FUN_OFFLINE, 143 DEVMAN_REMOVE_FUNCTION 142 144 } driver_to_devman_t; 143 145 144 146 typedef enum { 145 DRIVER_ADD_DEVICE = IPC_FIRST_USER_METHOD 146 147 DRIVER_DEV_ADD = IPC_FIRST_USER_METHOD, 148 DRIVER_DEV_REMOVE, 149 DRIVER_DEV_GONE, 150 DRIVER_FUN_ONLINE, 151 DRIVER_FUN_OFFLINE, 147 152 } devman_to_driver_t; 148 153 149 154 typedef enum { 150 155 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD, 151 DEVMAN_DEVICE_GET_HANDLE_BY_CLASS, 152 DEVMAN_DEVICE_GET_DEVICE_PATH 156 DEVMAN_DEV_GET_FUNCTIONS, 157 DEVMAN_FUN_GET_CHILD, 158 DEVMAN_FUN_GET_NAME, 159 DEVMAN_FUN_ONLINE, 160 DEVMAN_FUN_OFFLINE, 161 DEVMAN_FUN_GET_PATH, 162 DEVMAN_FUN_SID_TO_HANDLE 153 163 } client_to_devman_t; 154 164 -
uspace/lib/c/include/ipc/ipc.h
r867e2555 r925a21e 42 42 #include <sys/types.h> 43 43 #include <ipc/common.h> 44 #include < kernel/ipc/ipc_methods.h>45 #include < kernel/synch/synch.h>44 #include <abi/ipc/methods.h> 45 #include <abi/synch.h> 46 46 #include <task.h> 47 47 … … 254 254 sysarg_t, sysarg_t, void *, ipc_async_callback_t, bool); 255 255 256 extern int ipc_connect_to_me(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t *,256 extern int ipc_connect_to_me(int, sysarg_t, sysarg_t, sysarg_t, task_id_t *, 257 257 sysarg_t *); 258 258 extern int ipc_connect_me(int); -
uspace/lib/c/include/ipc/loc.h
r867e2555 r925a21e 1 1 /* 2 2 * Copyright (c) 2007 Josef Cejka 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 27 28 */ 28 29 29 /** @addtogroup devmap30 /** @addtogroup loc 30 31 * @{ 31 32 */ 32 33 33 #ifndef LIBC_IPC_ DEVMAP_H_34 #define LIBC_IPC_ DEVMAP_H_34 #ifndef LIBC_IPC_LOC_H_ 35 #define LIBC_IPC_LOC_H_ 35 36 36 37 #include <ipc/common.h> 37 38 38 #define DEVMAP_NAME_MAXLEN 25539 #define LOC_NAME_MAXLEN 255 39 40 40 typedef sysarg_t devmap_handle_t; 41 typedef sysarg_t service_id_t; 42 typedef sysarg_t category_id_t; 41 43 42 44 typedef enum { 43 DEV_HANDLE_NONE,44 DEV_HANDLE_NAMESPACE,45 DEV_HANDLE_DEVICE46 } devmap_handle_type_t;45 LOC_OBJECT_NONE, 46 LOC_OBJECT_NAMESPACE, 47 LOC_OBJECT_SERVICE 48 } loc_object_type_t; 47 49 48 50 typedef enum { 49 DEVMAP_DRIVER_REGISTER = IPC_FIRST_USER_METHOD, 50 DEVMAP_DRIVER_UNREGISTER, 51 DEVMAP_DEVICE_REGISTER, 52 DEVMAP_DEVICE_UNREGISTER, 53 DEVMAP_DEVICE_GET_HANDLE, 54 DEVMAP_NAMESPACE_GET_HANDLE, 55 DEVMAP_HANDLE_PROBE, 56 DEVMAP_NULL_CREATE, 57 DEVMAP_NULL_DESTROY, 58 DEVMAP_GET_NAMESPACE_COUNT, 59 DEVMAP_GET_DEVICE_COUNT, 60 DEVMAP_GET_NAMESPACES, 61 DEVMAP_GET_DEVICES 62 } devmap_request_t; 51 LOC_SERVER_REGISTER = IPC_FIRST_USER_METHOD, 52 LOC_SERVER_UNREGISTER, 53 LOC_SERVICE_ADD_TO_CAT, 54 LOC_SERVICE_REGISTER, 55 LOC_SERVICE_UNREGISTER, 56 LOC_SERVICE_GET_ID, 57 LOC_SERVICE_GET_NAME, 58 LOC_NAMESPACE_GET_ID, 59 LOC_CALLBACK_CREATE, 60 LOC_CATEGORY_GET_ID, 61 LOC_CATEGORY_GET_NAME, 62 LOC_CATEGORY_GET_SVCS, 63 LOC_ID_PROBE, 64 LOC_NULL_CREATE, 65 LOC_NULL_DESTROY, 66 LOC_GET_NAMESPACE_COUNT, 67 LOC_GET_SERVICE_COUNT, 68 LOC_GET_CATEGORIES, 69 LOC_GET_NAMESPACES, 70 LOC_GET_SERVICES 71 } loc_request_t; 63 72 64 /** Interface provided by devmap. 73 typedef enum { 74 LOC_EVENT_CAT_CHANGE = IPC_FIRST_USER_METHOD 75 } loc_event_t; 76 77 /** Ports provided by location service. 65 78 * 66 * Every process that connects to devmapmust ask one of following67 * interfacesotherwise connection will be refused.79 * Every process that connects to loc must ask one of following 80 * ports, otherwise connection will be refused. 68 81 * 69 82 */ 70 83 typedef enum { 71 /** Connect as device driver*/72 DEVMAP_DRIVER = 1,73 /** Connect as client */74 DEVMAP_CLIENT,84 /** Service supplier (server) port */ 85 LOC_PORT_SUPPLIER = 1, 86 /** Service consumer (client) port */ 87 LOC_PORT_CONSUMER, 75 88 /** Create new connection to instance of device that 76 89 is specified by second argument of call. */ 77 DEVMAP_CONNECT_TO_DEVICE78 } devmap_interface_t;90 LOC_CONNECT_TO_SERVICE 91 } loc_interface_t; 79 92 80 93 typedef struct { 81 devmap_handle_t handle;82 char name[ DEVMAP_NAME_MAXLEN + 1];83 } dev_desc_t;94 service_id_t id; 95 char name[LOC_NAME_MAXLEN + 1]; 96 } loc_sdesc_t; 84 97 85 98 #endif 99 100 /** @} 101 */ -
uspace/lib/c/include/ipc/services.h
r867e2555 r925a21e 43 43 SERVICE_NONE = 0, 44 44 SERVICE_LOAD = FOURCC('l', 'o', 'a', 'd'), 45 SERVICE_VIDEO = FOURCC('v', 'i', 'd', ' '),46 45 SERVICE_VFS = FOURCC('v', 'f', 's', ' '), 47 SERVICE_ DEVMAP = FOURCC('d', 'e', 'v', 'p'),46 SERVICE_LOC = FOURCC('l', 'o', 'c', ' '), 48 47 SERVICE_DEVMAN = FOURCC('d', 'e', 'v', 'n'), 49 48 SERVICE_IRC = FOURCC('i', 'r', 'c', ' '), -
uspace/lib/c/include/ipc/vfs.h
r867e2555 r925a21e 56 56 /** Unique identifier of the fs. */ 57 57 char name[FS_NAME_MAXLEN + 1]; 58 unsigned int instance; 58 59 bool concurrent_read_write; 59 60 bool write_retains_size; … … 62 63 typedef enum { 63 64 VFS_IN_OPEN = IPC_FIRST_USER_METHOD, 64 VFS_IN_OPEN_NODE,65 65 VFS_IN_READ, 66 66 VFS_IN_WRITE, … … 78 78 VFS_IN_RENAME, 79 79 VFS_IN_STAT, 80 VFS_IN_DUP 80 VFS_IN_DUP, 81 VFS_IN_WAIT_HANDLE, 81 82 } vfs_in_request_t; 82 83 -
uspace/lib/c/include/libc.h
r867e2555 r925a21e 37 37 38 38 #include <sys/types.h> 39 #include < kernel/syscall/syscall.h>39 #include <abi/syscall.h> 40 40 #include <libarch/syscall.h> 41 41 -
uspace/lib/c/include/loader/loader.h
r867e2555 r925a21e 38 38 39 39 #include <task.h> 40 #include <vfs/vfs.h>41 40 42 41 /** Forward declararion */ … … 50 49 extern int loader_set_pathname(loader_t *, const char *); 51 50 extern int loader_set_args(loader_t *, const char *const[]); 52 extern int loader_set_files(loader_t *, fdi_node_t *const[]);51 extern int loader_set_files(loader_t *, int *const[]); 53 52 extern int loader_load_program(loader_t *); 54 53 extern int loader_run(loader_t *); -
uspace/lib/c/include/loader/pcb.h
r867e2555 r925a21e 38 38 39 39 #include <sys/types.h> 40 #include <vfs/vfs.h>41 40 42 41 typedef void (*entry_point_t)(void); … … 62 61 63 62 /** Number of preset files. */ 64 int filc; 65 /** Preset files. */ 66 fdi_node_t **filv; 63 unsigned int filc; 67 64 68 65 /* -
uspace/lib/c/include/rtld/elf_dyn.h
r867e2555 r925a21e 36 36 #define LIBC_RTLD_ELF_DYN_H_ 37 37 38 #include <arch/elf.h>39 38 #include <sys/types.h> 40 41 39 #include <elf/elf.h> 42 40 #include <libarch/rtld/elf_dyn.h> -
uspace/lib/c/include/stats.h
r867e2555 r925a21e 40 40 #include <stdint.h> 41 41 #include <bool.h> 42 #include <kernel/sysinfo/abi.h> 42 #include <sys/types.h> 43 #include <abi/sysinfo.h> 43 44 44 45 extern stats_cpu_t *stats_get_cpus(size_t *); -
uspace/lib/c/include/str.h
r867e2555 r925a21e 1 1 /* 2 2 * Copyright (c) 2005 Martin Decky 3 * Copyright (c) 2011 Oleg Romanenko 3 4 * All rights reserved. 4 5 * … … 83 84 extern char *wstr_to_astr(const wchar_t *src); 84 85 extern void str_to_wstr(wchar_t *dest, size_t dlen, const char *src); 86 extern wchar_t *str_to_awstr(const char *src); 87 extern int utf16_to_str(char *dest, size_t size, const uint16_t *src); 88 extern int str_to_utf16(uint16_t *dest, size_t size, const char *src); 85 89 86 90 extern char *str_chr(const char *str, wchar_t ch); … … 93 97 extern char *str_ndup(const char *, size_t max_size); 94 98 99 extern int str_uint8_t(const char *, char **, unsigned int, bool, uint8_t *); 100 extern int str_uint16_t(const char *, char **, unsigned int, bool, uint16_t *); 101 extern int str_uint32_t(const char *, char **, unsigned int, bool, uint32_t *); 95 102 extern int str_uint64(const char *, char **, unsigned int, bool, uint64_t *); 96 103 extern int str_size_t(const char *, char **, unsigned int, bool, size_t *); -
uspace/lib/c/include/sys/stat.h
r867e2555 r925a21e 39 39 #include <bool.h> 40 40 #include <ipc/vfs.h> 41 #include <ipc/ devmap.h>41 #include <ipc/loc.h> 42 42 43 43 struct stat { 44 44 fs_handle_t fs_handle; 45 devmap_handle_t devmap_handle;45 service_id_t service_id; 46 46 fs_index_t index; 47 47 unsigned int lnkcnt; … … 49 49 bool is_directory; 50 50 aoff64_t size; 51 devmap_handle_t device;51 service_id_t service; 52 52 }; 53 53 -
uspace/lib/c/include/syscall.h
r867e2555 r925a21e 45 45 46 46 #include <sys/types.h> 47 #include < kernel/syscall/syscall.h>47 #include <abi/syscall.h> 48 48 49 49 #define __syscall0 __syscall -
uspace/lib/c/include/sysinfo.h
r867e2555 r925a21e 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
r867e2555 r925a21e 37 37 38 38 #include <sys/types.h> 39 #include <vfs/vfs.h> 40 41 typedef uint64_t task_id_t; 39 #include <abi/proc/task.h> 42 40 43 41 typedef enum { … … 53 51 extern int task_spawnv(task_id_t *, const char *path, const char *const []); 54 52 extern int task_spawnvf(task_id_t *, const char *path, const char *const [], 55 fdi_node_t *const []);53 int *const []); 56 54 extern int task_spawnl(task_id_t *, const char *path, ...); 57 55 -
uspace/lib/c/include/thread.h
r867e2555 r925a21e 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 *); -
uspace/lib/c/include/udebug.h
r867e2555 r925a21e 36 36 #define LIBC_UDEBUG_H_ 37 37 38 #include < kernel/udebug/udebug.h>38 #include <abi/udebug.h> 39 39 #include <sys/types.h> 40 40 #include <async.h> -
uspace/lib/c/include/vfs/vfs.h
r867e2555 r925a21e 38 38 #include <sys/types.h> 39 39 #include <ipc/vfs.h> 40 #include <ipc/ devmap.h>40 #include <ipc/loc.h> 41 41 #include <stdio.h> 42 #include <async.h> 42 43 43 /** Libc version of the VFS triplet. 44 * 45 * Unique identification of a file system node 46 * within a file system instance. 47 * 48 */ 49 typedef struct { 50 fs_handle_t fs_handle; 51 devmap_handle_t devmap_handle; 52 fs_index_t index; 53 } fdi_node_t; 44 enum vfs_change_state_type { 45 VFS_PASS_HANDLE 46 }; 54 47 55 48 extern char *absolutize(const char *, size_t *); 56 49 57 50 extern int mount(const char *, const char *, const char *, const char *, 58 unsigned int );51 unsigned int, unsigned int); 59 52 extern int unmount(const char *); 60 53 61 extern int open_node(fdi_node_t *, int); 62 extern int fd_node(int, fdi_node_t *); 54 extern int fhandle(FILE *, int *); 63 55 64 extern FILE *fopen_node(fdi_node_t *, const char *); 65 extern int fnode(FILE *, fdi_node_t *); 56 extern int fd_wait(void); 57 58 extern async_exch_t *vfs_exchange_begin(void); 59 extern void vfs_exchange_end(async_exch_t *); 66 60 67 61 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
