MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / fd_2_channel

Function fd_2_channel

components/lwp/lwp_ipc.c:1123–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1121}
1122
1123static rt_channel_t fd_2_channel(int fdt_type, int fd)
1124{
1125 struct dfs_file *d;
1126
1127 d = lwp_fd_get(fdt_type, fd);
1128 if (d)
1129 {
1130 rt_channel_t ch;
1131
1132 ch = (rt_channel_t)d->vnode->data;
1133 if (ch)
1134 {
1135 return ch;
1136 }
1137 }
1138 return RT_NULL;
1139}
1140
1141rt_err_t lwp_channel_close(int fdt_type, int fd)
1142{

Callers 5

lwp_channel_closeFunction · 0.85
lwp_channel_sendFunction · 0.85
lwp_channel_replyFunction · 0.85
lwp_channel_recv_timeoutFunction · 0.85

Calls 1

lwp_fd_getFunction · 0.85

Tested by

no test coverage detected