mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling 1. Add semaphore uninterruptible wait function 2 .Replace semaphore wait loop with a single uninterruptible wait 3. Replace all sem_xxx to nxsem_xxx * Unify the void cast usage 1. Remove void cast for function because many place ignore the returned value witout cast 2. Replace void cast for variable with UNUSED macro
This commit is contained in:
+6
-6
@@ -717,8 +717,8 @@ static inline void audio_dequeuebuffer(FAR struct audio_upperhalf_s *upper,
|
||||
msg.session = session;
|
||||
#endif
|
||||
apb->flags |= AUDIO_APB_DEQUEUED;
|
||||
(void)nxmq_send(upper->usermq, (FAR const char *)&msg, sizeof(msg),
|
||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||
nxmq_send(upper->usermq, (FAR const char *)&msg, sizeof(msg),
|
||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -755,8 +755,8 @@ static inline void audio_complete(FAR struct audio_upperhalf_s *upper,
|
||||
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||
msg.session = session;
|
||||
#endif
|
||||
(void)nxmq_send(upper->usermq, (FAR const char *)&msg, sizeof(msg),
|
||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||
nxmq_send(upper->usermq, (FAR const char *)&msg, sizeof(msg),
|
||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -788,8 +788,8 @@ static inline void audio_message(FAR struct audio_upperhalf_s *upper,
|
||||
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||
msg.session = session;
|
||||
#endif
|
||||
(void)nxmq_send(upper->usermq, (FAR const char *)msg, sizeof(*msg),
|
||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||
nxmq_send(upper->usermq, (FAR const char *)msg, sizeof(*msg),
|
||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user