Lines Matching defs:handle
40 /* Return a boolean value indicating whether a device handle is valid */
52 static bool is_valid_entity(const uintptr_t handle)
54 const io_entity_t *entity = (io_entity_t *)handle;
83 /* Set a handle to track an entity */
84 static void set_handle(uintptr_t *handle, io_entity_t *entity)
86 assert(handle != NULL);
87 *handle = (uintptr_t)entity;
162 uintptr_t *handle)
164 assert(handle != NULL);
165 return io_storage_dev_open(dev_con, dev_spec, (io_dev_info_t **)handle);
209 int io_open(uintptr_t dev_handle, const uintptr_t spec, uintptr_t *handle)
212 assert((spec != (uintptr_t)NULL) && (handle != NULL));
226 set_handle(handle, entity);
235 int io_seek(uintptr_t handle, io_seek_mode_t mode, signed long long offset)
238 assert(is_valid_entity(handle) && is_valid_seek_mode(mode));
240 io_entity_t *entity = (io_entity_t *)handle;
252 int io_size(uintptr_t handle, size_t *length)
255 assert(is_valid_entity(handle) && (length != NULL));
257 io_entity_t *entity = (io_entity_t *)handle;
269 int io_read(uintptr_t handle,
275 assert(is_valid_entity(handle));
277 io_entity_t *entity = (io_entity_t *)handle;
289 int io_write(uintptr_t handle,
295 assert(is_valid_entity(handle));
297 io_entity_t *entity = (io_entity_t *)handle;
311 int io_close(uintptr_t handle)
314 assert(is_valid_entity(handle));
316 io_entity_t *entity = (io_entity_t *)handle;