net: sockets: Add fcntl to socket offloading API
Offload fcntl calls through socket offloading API. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
717b647c30
commit
0b93c68f79
4 changed files with 29 additions and 0 deletions
|
@ -19,3 +19,18 @@ void socket_offload_register(const struct socket_offload *ops)
|
|||
|
||||
socket_ops = ops;
|
||||
}
|
||||
|
||||
int fcntl(int fd, int cmd, ...)
|
||||
{
|
||||
__ASSERT_NO_MSG(socket_ops);
|
||||
__ASSERT_NO_MSG(socket_ops->fcntl);
|
||||
|
||||
va_list args;
|
||||
int res;
|
||||
|
||||
va_start(args, cmd);
|
||||
res = socket_ops->fcntl(fd, cmd, args);
|
||||
va_end(args);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue