diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-31 23:29:34 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-31 23:29:34 +0000 |
commit | 966e801032745429ec2f28f9e5ab0b3fc8a68d3d (patch) | |
tree | 8c1586e169aa482558c987cd7c4a542e4a6c6d4a /nuttx/drivers/serial/serial.c | |
parent | 28a0241ccd48963a13638c1dfbef161ab1bf557e (diff) | |
download | px4-firmware-966e801032745429ec2f28f9e5ab0b3fc8a68d3d.tar.gz px4-firmware-966e801032745429ec2f28f9e5ab0b3fc8a68d3d.tar.bz2 px4-firmware-966e801032745429ec2f28f9e5ab0b3fc8a68d3d.zip |
Misc clean; mark assertions as non-returning; allow toolchain prefix to be overriden from make command line
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5591 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/serial/serial.c')
-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 0548d8c25..9c6acf2ee 100644 --- a/nuttx/drivers/serial/serial.c +++ b/nuttx/drivers/serial/serial.c @@ -1041,8 +1041,11 @@ void uart_datasent(FAR uart_dev_t *dev) #ifdef CONFIG_SERIAL_REMOVABLE void uart_connected(FAR uart_dev_t *dev, bool connected) { + irqstate_t flags; + /* Is the device disconnected? */ + flags = irqsave(); dev->disconnected = !connected; if (!connected) { @@ -1070,10 +1073,12 @@ void uart_connected(FAR uart_dev_t *dev, bool connected) (void)sem_post(&dev->recvsem); } - /* Notify all poll/select waiters that and hangup/error occurred */ + /* Notify all poll/select waiters that and hangup occurred */ uart_pollnotify(dev, (POLLERR|POLLHUP)); } + + irqrestore(flags); } #endif |