diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-15 20:26:34 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-15 20:26:34 +0000 |
commit | 6353b7f4d277bc2145ad408e349f2a9a98c8c397 (patch) | |
tree | d4ccbfd8eaf3d042c0731d2ab970aea8dddeb768 /nuttx/net/connect.c | |
parent | 69ed3e725f394bd249cb732945a0fc989b394746 (diff) | |
download | px4-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/connect.c')
-rw-r--r-- | nuttx/net/connect.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/net/connect.c b/nuttx/net/connect.c index 6a5c2a8a2..ae4518ad0 100644 --- a/nuttx/net/connect.c +++ b/nuttx/net/connect.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/connect.c * - * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -325,7 +325,7 @@ static inline int tcp_connect(FAR struct socket *psock, const struct sockaddr_in #endif { struct tcp_connect_s state; - irqstate_t flags; + uip_lock_t flags; int ret = OK; /* Interrupts must be disabled through all of the following because @@ -333,7 +333,7 @@ static inline int tcp_connect(FAR struct socket *psock, const struct sockaddr_in * setup. */ - flags = irqsave(); + flags = uip_lock(); /* Get the connection reference from the socket */ @@ -356,19 +356,19 @@ static inline int tcp_connect(FAR struct socket *psock, const struct sockaddr_in if (ret >= 0) { /* Wait for either the connect to complete or for an error/timeout - * to occur. NOTES: (1) sem_wait will also terminate if a signal - * is received, (2) interrupts are disabled! They will be re- + * to occur. NOTES: (1) uip_lockedwait will also terminate if a signal + * is received, (2) interrupts may be disabled! They will be re- * enabled while the task sleeps and automatically re-disabled * when the task restarts. */ - ret = sem_wait(&state.tc_sem); + ret = uip_lockedwait(&state.tc_sem); /* Uninitialize the state structure */ (void)sem_destroy(&state.tc_sem); - /* If sem_wait failed, recover the negated error (probably -EINTR) */ + /* If uip_lockedwait failed, recover the negated error (probably -EINTR) */ if (ret < 0) { @@ -401,7 +401,7 @@ static inline int tcp_connect(FAR struct socket *psock, const struct sockaddr_in } } - irqrestore(flags); + uip_unlock(flags); return ret; } #endif /* CONFIG_NET_TCP */ |