source: rtems/cpukit/posix/src/mqueuedeletesupp.c @ c3d8d9e

5
Last change on this file since c3d8d9e was c3d8d9e, checked in by Sebastian Huber <sebastian.huber@…>, on 05/23/16 at 04:55:49

score: Get rid of mp_id parameter

Get rid of the mp_id parameter used for some thread queue methods. Use
THREAD_QUEUE_QUEUE_TO_OBJECT() instead.

  • Property mode set to 100644
File size: 853 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief POSIX Delete Message Queue
5 *  @ingroup POSIX_MQUEUE
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2009.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/posix/mqueueimpl.h>
22
23void _POSIX_Message_queue_Delete(
24  POSIX_Message_queue_Control *the_mq,
25  ISR_lock_Context            *lock_context
26)
27{
28  if ( !the_mq->linked && the_mq->open_count == 0 ) {
29    _CORE_message_queue_Close(
30      &the_mq->Message_queue,
31      NULL,        /* no MP support */
32      lock_context
33    );
34    _POSIX_Message_queue_Free( the_mq );
35  } else {
36    _CORE_message_queue_Release( &the_mq->Message_queue, lock_context );
37  }
38}
Note: See TracBrowser for help on using the repository browser.