Home | History | Annotate | Download | only in lib

Lines Matching refs:fh

37 static inline storage_session_t _to_session(file_handle_t fh)
39 return (storage_session_t)(fh >> 32);
42 static inline uint32_t _to_handle(file_handle_t fh)
44 return (uint32_t) fh;
166 void storage_close_file(file_handle_t fh)
169 struct storage_file_close_req req = { .handle = _to_handle(fh)};
173 ssize_t rc = send_reqv(_to_session(fh), tx, 2, rx, 1);
191 static int _read_chunk(file_handle_t fh, storage_off_t off, void *buf, size_t size)
194 struct storage_file_read_req req = { .handle = _to_handle(fh), .size = size, .offset = off };
198 ssize_t rc = send_reqv(_to_session(fh), tx, 2, rx, 2);
202 ssize_t storage_read(file_handle_t fh, storage_off_t off, void *buf, size_t size)
212 rc = _read_chunk(fh, off, ptr, chunk);
225 static int _write_req(file_handle_t fh, storage_off_t off,
229 struct storage_file_write_req req = { .handle = _to_handle(fh), .offset = off, };
233 ssize_t rc = send_reqv(_to_session(fh), tx, 3, rx, 1);
238 ssize_t storage_write(file_handle_t fh, storage_off_t off,
253 rc = _write_req(fh, off, ptr, chunk, msg_flags);
268 int storage_set_file_size(file_handle_t fh, storage_off_t file_size, uint32_t opflags)
271 struct storage_file_set_size_req req = { .handle = _to_handle(fh), .size = file_size, };
275 ssize_t rc = send_reqv(_to_session(fh), tx, 2, rx, 1);
279 int storage_get_file_size(file_handle_t fh, storage_off_t *size_p)
282 struct storage_file_get_size_req req = { .handle = _to_handle(fh), };
287 ssize_t rc = send_reqv(_to_session(fh), tx, 2, rx, 2);