Changeset d347b53 in mainline for uspace/srv/devman/devman.h
- Timestamp:
- 2010-03-21T19:33:58Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 66babbd
- Parents:
- bda60d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.h
rbda60d9 rd347b53 141 141 // Drivers 142 142 143 /** 144 * Initialize the list of device driver's. 145 * 146 * @param drv_list the list of device driver's. 147 * 148 */ 143 149 static inline void init_driver_list(driver_list_t *drv_list) 144 150 { … … 165 171 void initialize_running_driver(driver_t *driver); 166 172 167 173 /** 174 * Initialize device driver structure. 175 * 176 * @param drv the device driver structure. 177 * 178 */ 168 179 static inline void init_driver(driver_t *drv) 169 180 { … … 176 187 } 177 188 189 /** 190 * Device driver structure clean-up. 191 * 192 * @param drv the device driver structure. 193 */ 178 194 static inline void clean_driver(driver_t *drv) 179 195 { … … 188 204 } 189 205 206 /** 207 * Delete device driver structure. 208 * 209 * @param drv the device driver structure.* 210 */ 190 211 static inline void delete_driver(driver_t *drv) 191 212 { … … 197 218 198 219 // Device nodes 199 220 /** 221 * Create a new device node. 222 * 223 * @return a device node structure. 224 * 225 */ 200 226 static inline node_t * create_dev_node() 201 227 { … … 207 233 list_initialize(&res->children); 208 234 list_initialize(&res->match_ids.ids); 235 fibril_mutex_initialize(&res->children_mutex); 209 236 210 237 return res; 211 238 } 212 239 240 static inline void delete_dev_node(node_t *node) 241 { 242 assert(list_empty(&node->children) && NULL == node->parent && NULL == node->drv); 243 244 clean_match_ids(&node->match_ids); 245 free_not_null(node->name); 246 free_not_null(node->pathname); 247 free(node); 248 } 249 250 /** 251 * Find the device node structure of the device witch has the specified handle. 252 * 253 * @param tree the device tree where we look for the device node. 254 * @param handle the handle of the device. 255 * @return the device node. 256 */ 213 257 static inline node_t * find_dev_node(dev_tree_t *tree, long handle) 214 258 {
Note:
See TracChangeset
for help on using the changeset viewer.