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:
김정찬
2019-08-05 18:30:07 -06:00
committed by Gregory Nutt
parent 721994846c
commit a12f80fb90
3 changed files with 48 additions and 12 deletions
+3 -2
View File
@@ -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