diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-22 06:51:31 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-22 06:51:31 -0600 |
commit | 2cae47a7c9bd3520b55ae62efa33b92526ba3e3f (patch) | |
tree | 5e4aefcbd615a2887344a8d8710ad7fd930f3741 /nuttx/net/utils | |
parent | 70243edc4a9811caf2c98334ad2a057efeab10f5 (diff) | |
download | px4-nuttx-2cae47a7c9bd3520b55ae62efa33b92526ba3e3f.tar.gz px4-nuttx-2cae47a7c9bd3520b55ae62efa33b92526ba3e3f.tar.bz2 px4-nuttx-2cae47a7c9bd3520b55ae62efa33b92526ba3e3f.zip |
Networking: Correct the value returned by accept() in the case where net_lockingwait() is called. It was returning -1 and losing the errno value. Noted by Rony Xln
Diffstat (limited to 'nuttx/net/utils')
-rw-r--r-- | nuttx/net/utils/net_lock.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nuttx/net/utils/net_lock.c b/nuttx/net/utils/net_lock.c index e0446690a..a8ee355ab 100644 --- a/nuttx/net/utils/net_lock.c +++ b/nuttx/net/utils/net_lock.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/utils/net_lock.c * - * Copyright (C) 2011-2012, 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012, 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -178,6 +178,14 @@ void net_unlock(net_lock_t flags) * Description: * Atomically wait for sem while temporarily releasing g_netlock. * + * Input Parameters: + * sem - A reference to the semaphore to be taken. + * + * Returned value: + * The returned value is the same as sem_wait(): Zero (OK) is returned + * on success; -1 (ERROR) is returned on a failure with the errno value + * set appropriately. + * ****************************************************************************/ int net_lockedwait(sem_t *sem) |