summaryrefslogtreecommitdiff
path: root/nuttx/net/net_sockets.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/net_sockets.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/net_sockets.c')
-rw-r--r--nuttx/net/net_sockets.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nuttx/net/net_sockets.c b/nuttx/net/net_sockets.c
index 6e54c8719..dce8aa1f0 100644
--- a/nuttx/net/net_sockets.c
+++ b/nuttx/net/net_sockets.c
@@ -1,7 +1,7 @@
/****************************************************************************
* net/net_sockets.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>
*
* Redistribution and use in source and binary forms, with or without
@@ -78,7 +78,7 @@ static void _net_semtake(FAR struct socketlist *list)
{
/* Take the semaphore (perhaps waiting) */
- while (sem_wait(&list->sl_sem) != 0)
+ while (uip_lockedwait(&list->sl_sem) != 0)
{
/* The only case that an error should occr here is if
* the wait was awakened by a signal.
@@ -149,9 +149,9 @@ int net_addreflist(FAR struct socketlist *list)
* on semaphores.
*/
- register irqstate_t flags = irqsave();
+ register uip_lock_t flags = uip_lock();
list->sl_crefs++;
- irqrestore(flags);
+ uip_unlock(flags);
}
return OK;
}
@@ -173,9 +173,9 @@ int net_releaselist(FAR struct socketlist *list)
* on semaphores.
*/
- irqstate_t flags = irqsave();
+ uip_lock_t flags = uip_lock();
crefs = --(list->sl_crefs);
- irqrestore(flags);
+ uip_unlock(flags);
/* If the count decrements to zero, then there is no reference
* to the structure and it should be deallocated. Since there