mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
sched/mqueue/mq_desclose.c: Add a test to verify that message queue is closed by the same task group that opened it. If not, then list corruption would result. This test is only performed if CONFIG_DEBUG_FEATURES is enabled since it should not normally be an issue: It would be a strange programming practice to open a message queue in open task group, then close it in another.
This commit is contained in:
@@ -390,14 +390,15 @@ int nxmq_close_group(mqd_t mqdes, FAR struct task_group_s *group);
|
||||
* group - Group that has the open descriptor.
|
||||
*
|
||||
* Returned Value:
|
||||
* None.
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* and failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* - Called only from mq_close() with the scheduler locked.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void nxmq_desclose_group(mqd_t mqdes, FAR struct task_group_s *group);
|
||||
int nxmq_desclose_group(mqd_t mqdes, FAR struct task_group_s *group);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user