diff options
Diffstat (limited to 'nuttx/drivers/serial/serial.c')
-rw-r--r-- | nuttx/drivers/serial/serial.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nuttx/drivers/serial/serial.c b/nuttx/drivers/serial/serial.c index c43060b2b..f2f1e4b99 100644 --- a/nuttx/drivers/serial/serial.c +++ b/nuttx/drivers/serial/serial.c @@ -329,6 +329,10 @@ static ssize_t uart_read(FAR struct file *filep, FAR char *buffer, size_t buflen * the head index but must not modify the tail index. The tail * index is only modified in this function. Therefore, no * special handshaking is required here. + * + * The head and tail pointers are 16-bit values. The only time that + * the following could be unsafe is if the CPU made two non-atomic + * 8-bit accesses to obtain the 16-bit head index. */ tail = dev->recv.tail; |