| 173 | #endif /* SAL_USING_POSIX */ |
| 174 | |
| 175 | static int inet_socket(int domain, int type, int protocol) |
| 176 | { |
| 177 | #ifdef SAL_USING_POSIX |
| 178 | int socket; |
| 179 | |
| 180 | socket = lwip_socket(domain, type, protocol); |
| 181 | if (socket >= 0) |
| 182 | { |
| 183 | struct lwip_sock *lwsock; |
| 184 | |
| 185 | lwsock = lwip_tryget_socket(socket); |
| 186 | lwsock->conn->callback = event_callback; |
| 187 | |
| 188 | rt_wqueue_init(&lwsock->wait_head); |
| 189 | } |
| 190 | |
| 191 | return socket; |
| 192 | #else |
| 193 | return lwip_socket(domain, type, protocol); |
| 194 | #endif /* SAL_USING_POSIX */ |
| 195 | } |
| 196 | |
| 197 | static int inet_accept(int socket, struct sockaddr *addr, socklen_t *addrlen) |
| 198 | { |
nothing calls this directly
no test coverage detected