diff options
Diffstat (limited to 'nuttx/net/uip')
-rw-r--r-- | nuttx/net/uip/uip_tcpbacklog.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nuttx/net/uip/uip_tcpbacklog.c b/nuttx/net/uip/uip_tcpbacklog.c index 8e6d1fb90..d97acde9c 100644 --- a/nuttx/net/uip/uip_tcpbacklog.c +++ b/nuttx/net/uip/uip_tcpbacklog.c @@ -265,6 +265,25 @@ int uip_backlogadd(FAR struct uip_conn *conn, FAR struct uip_conn *blconn) * Function: uip_backlogremove * * Description: + * Called from poll(). Before waiting for a new connection, poll will + * call this API to see if there are pending connections in the backlog. + * + * Assumptions: + * Called from normal user code, but with interrupts disabled, + * + ****************************************************************************/ + +#ifndef CONFIG_DISABLE_POLL +boolean uip_backlogavailable(FAR struct uip_conn *conn) +{ + return (conn && conn->backlog && !sq_empty(&conn->backlog->bl_pending)); +} +#endif + +/**************************************************************************** + * Function: uip_backlogremove + * + * Description: * Called from accept(). Before waiting for a new connection, accept will * call this API to see if there are pending connections in the backlog. * |