diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-12-13 08:44:28 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-12-13 08:44:28 -0600 |
commit | 7e91f8810fdd60503d351af80ed91c5d4e31ca91 (patch) | |
tree | 6e279e2013bc99e610e3345bac7ae4f7b37795e5 /nuttx/drivers/serial | |
parent | 9a632705357ece9571855f8be8f4c23f34629e52 (diff) | |
download | px4-nuttx-7e91f8810fdd60503d351af80ed91c5d4e31ca91.tar.gz px4-nuttx-7e91f8810fdd60503d351af80ed91c5d4e31ca91.tar.bz2 px4-nuttx-7e91f8810fdd60503d351af80ed91c5d4e31ca91.zip |
Update TODO list and add REVISIT comment
Diffstat (limited to 'nuttx/drivers/serial')
-rw-r--r-- | nuttx/drivers/serial/serial.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nuttx/drivers/serial/serial.c b/nuttx/drivers/serial/serial.c index 3ae4bd2e4..4d40527fe 100644 --- a/nuttx/drivers/serial/serial.c +++ b/nuttx/drivers/serial/serial.c @@ -1121,7 +1121,12 @@ static int uart_close(FAR struct file *filep) /* We need to re-initialize the semaphores if this is the last close * of the device, as the close might be caused by pthread_cancel() of - * a thread currently blocking on any of them + * a thread currently blocking on any of them. + * + * REVISIT: This logic *only* works in the case where the cancelled + * thread had the only reference to the serial driver. If there other + * references, then the this logic will not be executed and the + * semaphore count will still be incorrect. */ sem_reinit(&dev->xmitsem, 0, 0); |