summaryrefslogtreecommitdiff
path: root/nuttx/net/uip/uip_listen.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-15 20:26:34 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-15 20:26:34 +0000
commit6353b7f4d277bc2145ad408e349f2a9a98c8c397 (patch)
treed4ccbfd8eaf3d042c0731d2ab970aea8dddeb768 /nuttx/net/uip/uip_listen.c
parent69ed3e725f394bd249cb732945a0fc989b394746 (diff)
downloadpx4-nuttx-6353b7f4d277bc2145ad408e349f2a9a98c8c397.tar.gz
px4-nuttx-6353b7f4d277bc2145ad408e349f2a9a98c8c397.tar.bz2
px4-nuttx-6353b7f4d277bc2145ad408e349f2a9a98c8c397.zip
More SLIP integration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3384 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/uip/uip_listen.c')
-rw-r--r--nuttx/net/uip/uip_listen.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/net/uip/uip_listen.c b/nuttx/net/uip/uip_listen.c
index a913abc25..8052ca236 100644
--- a/nuttx/net/uip/uip_listen.c
+++ b/nuttx/net/uip/uip_listen.c
@@ -1,7 +1,7 @@
/****************************************************************************
* net/uip/uip_listen.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* A direct leverage of logic from uIP which also has b BSD style license
@@ -139,11 +139,11 @@ void uip_listeninit(void)
int uip_unlisten(struct uip_conn *conn)
{
- irqstate_t flags;
+ uip_lock_t flags;
int ndx;
int ret = -EINVAL;
- flags = irqsave();
+ flags = uip_lock();
for (ndx = 0; ndx < CONFIG_NET_MAX_LISTENPORTS; ndx++)
{
if (uip_listenports[ndx] == conn)
@@ -154,7 +154,7 @@ int uip_unlisten(struct uip_conn *conn)
}
}
- irqrestore(flags);
+ uip_unlock(flags);
return ret;
}
@@ -171,7 +171,7 @@ int uip_unlisten(struct uip_conn *conn)
int uip_listen(struct uip_conn *conn)
{
- irqstate_t flags;
+ uip_lock_t flags;
int ndx;
int ret;
@@ -179,7 +179,7 @@ int uip_listen(struct uip_conn *conn)
* is accessed from interrupt level as well.
*/
- flags = irqsave();
+ flags = uip_lock();
/* First, check if there is already a socket listening on this port */
@@ -214,7 +214,7 @@ int uip_listen(struct uip_conn *conn)
}
}
- irqrestore(flags);
+ uip_unlock(flags);
return ret;
}