source: rtems/cpukit/score/src/coremsgflushwait.c @ b5d514f

4.115
Last change on this file since b5d514f was b5d514f, checked in by Sebastian Huber <sebastian.huber@…>, on 07/18/13 at 13:35:23

score: Create message queue implementation header

Move implementation specific parts of coremsg.h and coremsg.inl into new
header file coremsgimpl.h. The coremsg.h contains now only the
application visible API.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 * @file
3 *
4 * @brief Flush Waiting Threads.
5 *
6 * @ingroup ScoreMessageQueue
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-1999.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/system.h>
23#include <rtems/score/chain.h>
24#include <rtems/score/isr.h>
25#include <rtems/score/object.h>
26#include <rtems/score/coremsgimpl.h>
27#include <rtems/score/states.h>
28#include <rtems/score/thread.h>
29#include <rtems/score/wkspace.h>
30
31#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
32
33  void _CORE_message_queue_Flush_waiting_threads(
34    CORE_message_queue_Control *the_message_queue
35  )
36  {
37    /* XXX this is not supported for global message queues */
38
39    /*
40     *  IF there are no pending messages,
41     *  THEN threads may be blocked waiting to RECEIVE a message,
42     *
43     *  IF the pending message queue is full
44     *  THEN threads may be blocked waiting to SEND a message
45     *
46     *  But in either case, we will return "unsatisfied nowait"
47     *  to indicate that the blocking condition was not satisfied
48     *  and that the blocking state was canceled.
49     */
50
51    _Thread_queue_Flush(
52      &the_message_queue->Wait_queue,
53      NULL,
54      CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT
55    );
56  }
57#endif
Note: See TracBrowser for help on using the repository browser.