Lines Matching defs:sock

46         msg.sock = sock;                                       \
52 sock_set_errno(sock, err); \
53 done_socket(sock); \
60 struct lwip_sock *sock;
265 struct lwip_sock *sock;
272 sock = get_socket(s);
273 if (!sock) {
279 mask |= (sock->rcvevent > 0) ? (POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND) : 0;
280 mask |= (sock->sendevent != 0) ? (POLLOUT | POLLWRNORM | POLLWRBAND) : 0;
281 mask |= (sock->errevent != 0) ? (POLLERR) : 0;
285 spin_lock_irqsave(&sock->wq.lock, int_save);
286 wq_empty = LOS_ListEmpty(&(sock->wq.poll_queue));
287 spin_unlock_irqrestore(&sock->wq.lock, int_save);
290 __wake_up_interruptible_poll(&sock->wq, mask);
293 done_socket(sock);
300 struct lwip_sock *sock;
305 sock = get_socket(s);
306 if (!sock) {
314 mask |= (sock->rcvevent > 0 || sock->lastdata.pbuf) ? (POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND) : 0;
315 mask |= (sock->sendevent != 0) ? (POLLOUT | POLLWRNORM | POLLWRBAND) : 0;
316 mask |= (sock->errevent != 0) ? (POLLERR) : 0;
322 poll_wait(NULL, &sock->wq, wait);
325 done_socket(sock);
1377 static u8_t lwip_ioctl_impl(const struct lwip_sock *sock, long cmd, void *argp)
1393 is_ipv6 = NETCONNTYPE_ISIPV6((unsigned int)(sock->conn->type));
1396 struct net_group *group = get_net_group_from_ippcb(sock->conn->pcb.ip);
1580 return lwip_ioctl_impl(msg->sock, msg->cmd, msg->argp);
1701 struct lwip_sock *sock = NULL;
1704 sock = get_socket(sockfd);
1705 if (!sock) {
1711 sock->s_refcount++;
1715 done_socket(sock);
1720 struct lwip_sock *sock = NULL;
1723 sock = get_socket(sockfd);
1724 if (!sock) {
1730 if (sock->s_refcount == 0) {
1732 done_socket(sock);
1736 sock->s_refcount--;
1739 done_socket(sock);