Some trivial clean up associated with the last commit

This commit is contained in:
Gregory Nutt 2015-07-15 18:43:53 -06:00
parent 320c584888
commit 621fef2c31
2 changed files with 2 additions and 1 deletions

View File

@ -330,6 +330,7 @@ static ssize_t can_read(FAR struct file *filep, FAR char *buffer,
do
{
ret = sem_wait(&dev->cd_recv.rx_sem);
DEBUGASSERT(ret >= 0 || errno == EINTR);
}
while (dev->cd_recv.rx_head == dev->cd_recv.rx_tail);
dev->cd_nrxwaiters--;

View File

@ -283,7 +283,7 @@ struct can_dev_s
{
uint8_t cd_ocount; /* The number of times the device has been opened */
uint8_t cd_npendrtr; /* Number of pending RTR messages */
uint8_t cd_ntxwaiters; /* Number of threads waiting to enqueue a message */
volatile uint8_t cd_ntxwaiters; /* Number of threads waiting to enqueue a message */
volatile uint8_t cd_nrxwaiters; /* Number of threads waiting to receive a message */
sem_t cd_closesem; /* Locks out new opens while close is in progress */
sem_t cd_recvsem; /* Used to wakeup user waiting for space in cd_recv.buffer */