summaryrefslogtreecommitdiff
path: root/nuttx/net/uip/uip_igmpmsg.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_igmpmsg.c
parent69ed3e725f394bd249cb732945a0fc989b394746 (diff)
downloadnuttx-6353b7f4d277bc2145ad408e349f2a9a98c8c397.tar.gz
nuttx-6353b7f4d277bc2145ad408e349f2a9a98c8c397.tar.bz2
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_igmpmsg.c')
-rwxr-xr-xnuttx/net/uip/uip_igmpmsg.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/nuttx/net/uip/uip_igmpmsg.c b/nuttx/net/uip/uip_igmpmsg.c
index d9837d04a..182d7b92d 100755
--- a/nuttx/net/uip/uip_igmpmsg.c
+++ b/nuttx/net/uip/uip_igmpmsg.c
@@ -1,7 +1,7 @@
/****************************************************************************
* net/uip/uip_igmpmgs.c
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* The NuttX implementation of IGMP was inspired by the IGMP add-on for the
@@ -79,15 +79,15 @@
void uip_igmpschedmsg(FAR struct igmp_group_s *group, uint8_t msgid)
{
- irqstate_t flags = irqsave();
+ uip_lock_t flags;
/* The following should be atomic */
- flags = irqsave();
+ flags = uip_lock();
DEBUGASSERT(!IS_SCHEDMSG(group->flags));
group->msgid = msgid;
SET_SCHEDMSG(group->flags);
- irqrestore(flags);
+ uip_unlock(flags);
}
/****************************************************************************
@@ -99,17 +99,17 @@ void uip_igmpschedmsg(FAR struct igmp_group_s *group, uint8_t msgid)
*
* Assumptions:
* This function cannot be called from an interrupt handler (if you try it,
- * sem_wait will assert).
+ * uip_lockedwait will assert).
*
****************************************************************************/
void uip_igmpwaitmsg(FAR struct igmp_group_s *group, uint8_t msgid)
{
- irqstate_t flags;
+ uip_lock_t flags;
/* Schedule to send the message */
- flags = irqsave();
+ flags = uip_lock();
DEBUGASSERT(!IS_WAITMSG(group->flags));
SET_WAITMSG(group->flags);
uip_igmpschedmsg(group, msgid);
@@ -120,9 +120,9 @@ void uip_igmpwaitmsg(FAR struct igmp_group_s *group, uint8_t msgid)
{
/* Wait for the semaphore to be posted */
- while (sem_wait(&group->sem) != 0)
+ while (uip_lockedwait(&group->sem) != 0)
{
- /* The only error that should occur from sem_wait() is if
+ /* The only error that should occur from uip_lockedwait() is if
* the wait is awakened by a signal.
*/
@@ -133,7 +133,7 @@ void uip_igmpwaitmsg(FAR struct igmp_group_s *group, uint8_t msgid)
/* The message has been sent and we are no longer waiting */
CLR_WAITMSG(group->flags);
- irqrestore(flags);
+ uip_unlock(flags);
}
#endif /* CONFIG_NET_IGMP */