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

4.10
Last change on this file since e3f6d35 was d81b56bd, checked in by Joel Sherrill <joel.sherrill@…>, on 07/02/09 at 22:04:42

2009-07-02 Joel Sherrill <joel.sherrill@…>

  • score/include/rtems/score/coremsg.h, score/src/coremsgflushwait.c: Mark _CORE_message_queue_Flush_waiting_threads with FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API since there is no way to reach it via an API.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *  CORE Message Queue Handler
3 *
4 *  DESCRIPTION:
5 *
6 *  This package is the implementation of the CORE Message Queue Handler.
7 *  This core object provides task synchronization and communication functions
8 *  via messages passed to queue objects.
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 *  $Id$
18 */
19
20#if HAVE_CONFIG_H
21#include "config.h"
22#endif
23
24#include <rtems/system.h>
25#include <rtems/score/chain.h>
26#include <rtems/score/isr.h>
27#include <rtems/score/object.h>
28#include <rtems/score/coremsg.h>
29#include <rtems/score/states.h>
30#include <rtems/score/thread.h>
31#include <rtems/score/wkspace.h>
32
33#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
34  /*PAGE
35   *
36   *  _CORE_message_queue_Flush_waiting_threads
37   *
38   *  This function flushes the message_queue's task wait queue.  The number
39   *  of messages flushed from the queue is returned.
40   *
41   *  Input parameters:
42   *    the_message_queue - the message_queue to be flushed
43   *
44   *  Output parameters:
45   *    returns - the number of messages flushed from the queue
46   */
47
48  void _CORE_message_queue_Flush_waiting_threads(
49    CORE_message_queue_Control *the_message_queue
50  )
51  {
52    /* XXX this is not supported for global message queues */
53
54    /*
55     *  IF there are no pending messages,
56     *  THEN threads may be blocked waiting to RECEIVE a message,
57     *
58     *  IF the pending message queue is full
59     *  THEN threads may be blocked waiting to SEND a message
60     *
61     *  But in either case, we will return "unsatisfied nowait"
62     *  to indicate that the blocking condition was not satisfied
63     *  and that the blocking state was canceled.
64     */
65
66    _Thread_queue_Flush(
67      &the_message_queue->Wait_queue,
68      NULL,
69      CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT
70    );
71  }
72#endif
Note: See TracBrowser for help on using the repository browser.