Changeset b5e68c8 in mainline for uspace/lib/c/include/ipc/devman.h
- Timestamp:
- 2011-05-12T16:49:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36787d7
- Parents:
- e80329d6 (diff), 750636a (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/devman.h
re80329d6 rb5e68c8 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> 36 37 #include <adt/list.h> 37 #include <ipc/ipc.h> 38 #include <stdlib.h> 39 #include <stdio.h> 40 #include <str.h> 38 #include <malloc.h> 39 #include <mem.h> 41 40 42 #define DEVMAN_NAME_MAXLEN 25641 #define DEVMAN_NAME_MAXLEN 256 43 42 44 typedef ipcarg_t device_handle_t; 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; 45 53 46 54 /** Ids of device models used for device-to-driver matching. … … 67 75 } match_id_list_t; 68 76 69 70 static inline match_id_t * create_match_id() 77 static inline match_id_t *create_match_id(void) 71 78 { 72 79 match_id_t *id = malloc(sizeof(match_id_t)); … … 85 92 } 86 93 87 static inline void add_match_id(match_id_list_t *ids, match_id_t *id) 94 static inline void add_match_id(match_id_list_t *ids, match_id_t *id) 88 95 { 89 96 match_id_t *mid = NULL; 90 link_t *link = ids->ids.next; 97 link_t *link = ids->ids.next; 91 98 92 99 while (link != &ids->ids) { … … 98 105 } 99 106 100 list_insert_before(&id->link, link); 107 list_insert_before(&id->link, link); 101 108 } 102 109 … … 123 130 DEVMAN_CLIENT, 124 131 DEVMAN_CONNECT_TO_DEVICE, 132 DEVMAN_CONNECT_FROM_DEVMAP, 125 133 DEVMAN_CONNECT_TO_PARENTS_DEVICE 126 134 } devman_interface_t; … … 128 136 typedef enum { 129 137 DEVMAN_DRIVER_REGISTER = IPC_FIRST_USER_METHOD, 130 DEVMAN_ADD_ CHILD_DEVICE,138 DEVMAN_ADD_FUNCTION, 131 139 DEVMAN_ADD_MATCH_ID, 132 140 DEVMAN_ADD_DEVICE_TO_CLASS … … 140 148 141 149 typedef enum { 142 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD 150 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD, 151 DEVMAN_DEVICE_GET_HANDLE_BY_CLASS 143 152 } client_to_devman_t; 144 153
Note:
See TracChangeset
for help on using the changeset viewer.