source: rtems/cpukit/score/src/coremsgflushwait.c @ 2d7ae960

4.115
Last change on this file since 2d7ae960 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • 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
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/coremsg.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   *  _CORE_message_queue_Flush_waiting_threads
34   *
35   *  This function flushes the message_queue's task wait queue.  The number
36   *  of messages flushed from the queue is returned.
37   *
38   *  Input parameters:
39   *    the_message_queue - the message_queue to be flushed
40   *
41   *  Output parameters:
42   *    returns - the number of messages flushed from the queue
43   */
44
45  void _CORE_message_queue_Flush_waiting_threads(
46    CORE_message_queue_Control *the_message_queue
47  )
48  {
49    /* XXX this is not supported for global message queues */
50
51    /*
52     *  IF there are no pending messages,
53     *  THEN threads may be blocked waiting to RECEIVE a message,
54     *
55     *  IF the pending message queue is full
56     *  THEN threads may be blocked waiting to SEND a message
57     *
58     *  But in either case, we will return "unsatisfied nowait"
59     *  to indicate that the blocking condition was not satisfied
60     *  and that the blocking state was canceled.
61     */
62
63    _Thread_queue_Flush(
64      &the_message_queue->Wait_queue,
65      NULL,
66      CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT
67    );
68  }
69#endif
Note: See TracBrowser for help on using the repository browser.