Changes in uspace/lib/c/include/ipc/devman.h [fc8c2b6:692c40cb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/devman.h
rfc8c2b6 r692c40cb 30 30 * @{ 31 31 */ 32 32 33 33 #ifndef LIBC_IPC_DEVMAN_H_ 34 34 #define LIBC_IPC_DEVMAN_H_ 35 35 36 #include <ipc/common.h>37 36 #include <adt/list.h> 38 #include <malloc.h> 39 #include <mem.h> 37 #include <ipc/ipc.h> 38 #include <stdlib.h> 39 #include <stdio.h> 40 #include <str.h> 40 41 41 #define DEVMAN_NAME_MAXLEN 42 #define DEVMAN_NAME_MAXLEN 256 42 43 43 typedef sysarg_t devman_handle_t; 44 45 typedef enum { 46 /** Invalid value for debugging purposes */ 47 fun_invalid = 0, 48 /** Function to which child devices attach */ 49 fun_inner, 50 /** Fuction exported to external clients (leaf function) */ 51 fun_exposed 52 } fun_type_t; 44 typedef ipcarg_t device_handle_t; 53 45 54 46 /** Ids of device models used for device-to-driver matching. … … 75 67 } match_id_list_t; 76 68 77 static inline match_id_t *create_match_id(void) 69 70 static inline match_id_t * create_match_id() 78 71 { 79 72 match_id_t *id = malloc(sizeof(match_id_t)); … … 92 85 } 93 86 94 static inline void add_match_id(match_id_list_t *ids, match_id_t *id) 87 static inline void add_match_id(match_id_list_t *ids, match_id_t *id) 95 88 { 96 89 match_id_t *mid = NULL; 97 link_t *link = ids->ids.next; 90 link_t *link = ids->ids.next; 98 91 99 92 while (link != &ids->ids) { … … 105 98 } 106 99 107 list_insert_before(&id->link, link); 100 list_insert_before(&id->link, link); 108 101 } 109 102 … … 130 123 DEVMAN_CLIENT, 131 124 DEVMAN_CONNECT_TO_DEVICE, 132 DEVMAN_CONNECT_FROM_DEVMAP,133 125 DEVMAN_CONNECT_TO_PARENTS_DEVICE 134 126 } devman_interface_t; … … 136 128 typedef enum { 137 129 DEVMAN_DRIVER_REGISTER = IPC_FIRST_USER_METHOD, 138 DEVMAN_ADD_ FUNCTION,130 DEVMAN_ADD_CHILD_DEVICE, 139 131 DEVMAN_ADD_MATCH_ID, 140 132 DEVMAN_ADD_DEVICE_TO_CLASS … … 148 140 149 141 typedef enum { 150 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD, 151 DEVMAN_DEVICE_GET_HANDLE_BY_CLASS 142 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD 152 143 } client_to_devman_t; 153 144
Note:
See TracChangeset
for help on using the changeset viewer.