Some trivial clean up associated with the last commit
This commit is contained in:
parent
320c584888
commit
621fef2c31
@ -330,6 +330,7 @@ static ssize_t can_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
ret = sem_wait(&dev->cd_recv.rx_sem);
|
ret = sem_wait(&dev->cd_recv.rx_sem);
|
||||||
|
DEBUGASSERT(ret >= 0 || errno == EINTR);
|
||||||
}
|
}
|
||||||
while (dev->cd_recv.rx_head == dev->cd_recv.rx_tail);
|
while (dev->cd_recv.rx_head == dev->cd_recv.rx_tail);
|
||||||
dev->cd_nrxwaiters--;
|
dev->cd_nrxwaiters--;
|
||||||
|
@ -283,7 +283,7 @@ struct can_dev_s
|
|||||||
{
|
{
|
||||||
uint8_t cd_ocount; /* The number of times the device has been opened */
|
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_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 */
|
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_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 */
|
sem_t cd_recvsem; /* Used to wakeup user waiting for space in cd_recv.buffer */
|
||||||
|
Loading…
Reference in New Issue
Block a user