Lines Matching refs:fd
406 static void *_ipc_msg_get_file(int fd) in _ipc_msg_get_file() argument
410 d = fd_get(fd); in _ipc_msg_get_file()
425 int fd; in _ipc_msg_fd_new() local
436 fd = fd_new(); in _ipc_msg_fd_new()
437 if (fd < 0) in _ipc_msg_fd_new()
442 d = fd_get(fd); in _ipc_msg_fd_new()
445 fd_release(fd); in _ipc_msg_fd_new()
468 return fd; in _ipc_msg_fd_new()
525 data->u.fd.file = _ipc_msg_get_file(data->u.fd.fd); in _do_send_recv_timeout()
851 data->u.fd.fd = _ipc_msg_fd_new(data->u.fd.file); in _rt_raw_channel_recv_timeout()
902 data->u.fd.fd = _ipc_msg_fd_new(data->u.fd.file); in _rt_raw_channel_recv_timeout()
951 static struct dfs_file *lwp_fd_get(int fdt_type, int fd) in lwp_fd_get() argument
963 return fdt_get_file(fdt, fd); in lwp_fd_get()
966 static void lwp_fd_release(int fdt_type, int fd) in lwp_fd_release() argument
978 fdt_fd_release(fdt, fd); in lwp_fd_release()
984 int fd; in _chfd_alloc() local
987 fd = lwp_fd_new(fdt_type); in _chfd_alloc()
989 if (fd < 0) in _chfd_alloc()
993 return fd; in _chfd_alloc()
996 static void _chfd_free(int fd, int fdt_type) in _chfd_free() argument
1000 d = lwp_fd_get(fdt_type, fd); in _chfd_free()
1005 lwp_fd_release(fdt_type, fd); in _chfd_free()
1080 int fd; in lwp_channel_open() local
1084 fd = _chfd_alloc(fdt_type); /* allocate an IPC channel descriptor */ in lwp_channel_open()
1085 if (fd == -1) in lwp_channel_open()
1090 d = lwp_fd_get(fdt_type, fd); in lwp_channel_open()
1094 _chfd_free(fd, fdt_type); in lwp_channel_open()
1095 fd = -1; in lwp_channel_open()
1113 _chfd_free(fd, fdt_type); in lwp_channel_open()
1114 fd = -1; in lwp_channel_open()
1117 return fd; in lwp_channel_open()
1120 static rt_channel_t fd_2_channel(int fdt_type, int fd) in fd_2_channel() argument
1124 d = lwp_fd_get(fdt_type, fd); in fd_2_channel()
1138 rt_err_t lwp_channel_close(int fdt_type, int fd) in lwp_channel_close() argument
1144 d = lwp_fd_get(fdt_type, fd); in lwp_channel_close()
1156 ch = fd_2_channel(fdt_type, fd); in lwp_channel_close()
1161 _chfd_free(fd, fdt_type); in lwp_channel_close()
1171 rt_err_t lwp_channel_send(int fdt_type, int fd, rt_channel_msg_t data) in lwp_channel_send() argument
1175 ch = fd_2_channel(fdt_type, fd); in lwp_channel_send()
1183 rt_err_t lwp_channel_send_recv_timeout(int fdt_type, int fd, rt_channel_msg_t data, rt_channel_msg_… in lwp_channel_send_recv_timeout() argument
1187 ch = fd_2_channel(fdt_type, fd); in lwp_channel_send_recv_timeout()
1195 rt_err_t lwp_channel_reply(int fdt_type, int fd, rt_channel_msg_t data) in lwp_channel_reply() argument
1199 ch = fd_2_channel(fdt_type, fd); in lwp_channel_reply()
1207 rt_err_t lwp_channel_recv_timeout(int fdt_type, int fd, rt_channel_msg_t data, rt_int32_t time) in lwp_channel_recv_timeout() argument
1211 ch = fd_2_channel(fdt_type, fd); in lwp_channel_recv_timeout()
1224 rt_err_t rt_channel_close(int fd) in rt_channel_close() argument
1226 return lwp_channel_close(FDT_TYPE_KERNEL, fd); in rt_channel_close()
1229 rt_err_t rt_channel_send(int fd, rt_channel_msg_t data) in rt_channel_send() argument
1231 return lwp_channel_send(FDT_TYPE_KERNEL, fd, data); in rt_channel_send()
1234 rt_err_t rt_channel_send_recv_timeout(int fd, rt_channel_msg_t data, rt_channel_msg_t data_ret, rt_… in rt_channel_send_recv_timeout() argument
1236 return lwp_channel_send_recv_timeout(FDT_TYPE_KERNEL, fd, data, data_ret, time); in rt_channel_send_recv_timeout()
1239 rt_err_t rt_channel_send_recv(int fd, rt_channel_msg_t data, rt_channel_msg_t data_ret) in rt_channel_send_recv() argument
1241 return lwp_channel_send_recv_timeout(FDT_TYPE_KERNEL, fd, data, data_ret, RT_WAITING_FOREVER); in rt_channel_send_recv()
1244 rt_err_t rt_channel_reply(int fd, rt_channel_msg_t data) in rt_channel_reply() argument
1246 return lwp_channel_reply(FDT_TYPE_KERNEL, fd, data); in rt_channel_reply()
1249 rt_err_t rt_channel_recv_timeout(int fd, rt_channel_msg_t data, rt_int32_t time) in rt_channel_recv_timeout() argument
1251 return lwp_channel_recv_timeout(FDT_TYPE_KERNEL, fd, data, time); in rt_channel_recv_timeout()
1254 rt_err_t rt_channel_recv(int fd, rt_channel_msg_t data) in rt_channel_recv() argument
1256 return lwp_channel_recv_timeout(FDT_TYPE_KERNEL, fd, data, RT_WAITING_FOREVER); in rt_channel_recv()
1259 rt_err_t rt_channel_peek(int fd, rt_channel_msg_t data) in rt_channel_peek() argument
1261 return lwp_channel_recv_timeout(FDT_TYPE_KERNEL, fd, data, 0); in rt_channel_peek()