summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-13 20:05:31 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-13 20:05:31 +0000
commit17f623fff9262336a8b1bc6f62e2035b5708be78 (patch)
treee1965604d5382a9a3d901100e1e0a5c930a5dfea /nuttx
parent3da637648a3a0d45d3cb0d87b3f500715f673106 (diff)
downloadpx4-nuttx-17f623fff9262336a8b1bc6f62e2035b5708be78.tar.gz
px4-nuttx-17f623fff9262336a8b1bc6f62e2035b5708be78.tar.bz2
px4-nuttx-17f623fff9262336a8b1bc6f62e2035b5708be78.zip
Some structure elements should be marked volatile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1222 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/include/nuttx/serial.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/nuttx/include/nuttx/serial.h b/nuttx/include/nuttx/serial.h
index c2a7a875f..9954c16c0 100644
--- a/nuttx/include/nuttx/serial.h
+++ b/nuttx/include/nuttx/serial.h
@@ -74,11 +74,11 @@
struct uart_buffer_s
{
- sem_t sem; /* Used to control exclusive access to the buffer */
- sint16 head; /* Index to the head [IN] index in the buffer */
- sint16 tail; /* Index to the tail [OUT] index in the buffer */
- sint16 size; /* The allocated size of the buffer */
- FAR char *buffer; /* Pointer to the allocated buffer memory */
+ sem_t sem; /* Used to control exclusive access to the buffer */
+ volatile sint16 head; /* Index to the head [IN] index in the buffer */
+ volatile sint16 tail; /* Index to the tail [OUT] index in the buffer */
+ sint16 size; /* The allocated size of the buffer */
+ FAR char *buffer; /* Pointer to the allocated buffer memory */
};
/* This structure defines all of the operations providd by the architecture specific
@@ -179,23 +179,17 @@ struct uart_ops_s
struct uart_dev_s
{
- ubyte open_count; /* The number of times
- * the device has been opened */
- boolean xmitwaiting; /* TRUE: User is waiting
- * for space in xmit.buffer */
- boolean recvwaiting; /* TRUE: User is waiting
- * for space in recv.buffer */
- boolean isconsole; /* TRUE: This is the serial console */
- sem_t closesem; /* Locks out new opens while
- * close is in progress */
- sem_t xmitsem; /* Used to wakeup user waiting
- * for space in xmit.buffer */
- sem_t recvsem; /* Used to wakeup user waiting
- * for sapce in recv.buffer */
- struct uart_buffer_s xmit; /* Describes transmit buffer */
- struct uart_buffer_s recv; /* Describes receive buffer */
- FAR const struct uart_ops_s *ops; /* Arch-specific operations */
- FAR void *priv; /* Used by the arch-specific logic */
+ ubyte open_count; /* Number of times the device has been opened */
+ volatile boolean xmitwaiting; /* TRUE: User waiting for space in xmit.buffer */
+ volatile boolean recvwaiting; /* TRUE: User waiting for data in recv.buffer */
+ boolean isconsole; /* TRUE: This is the serial console */
+ sem_t closesem; /* Locks out new open while close is in progress */
+ sem_t xmitsem; /* Wakeup user waiting for space in xmit.buffer */
+ sem_t recvsem; /* Wakeup user waiting for data in recv.buffer */
+ struct uart_buffer_s xmit; /* Describes transmit buffer */
+ struct uart_buffer_s recv; /* Describes receive buffer */
+ FAR const struct uart_ops_s *ops; /* Arch-specific operations */
+ FAR void *priv; /* Used by the arch-specific logic */
};
typedef struct uart_dev_s uart_dev_t;