OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [src/] [coremsgflush.c] - Blame information for rev 609

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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.OARcorp.com/rtems/license.html.
16
 *
17
 *  $Id: coremsgflush.c,v 1.2 2001-09-27 11:59:34 chris Exp $
18
 */
19
 
20
#include <rtems/system.h>
21
#include <rtems/score/chain.h>
22
#include <rtems/score/isr.h>
23
#include <rtems/score/object.h>
24
#include <rtems/score/coremsg.h>
25
#include <rtems/score/states.h>
26
#include <rtems/score/thread.h>
27
#include <rtems/score/wkspace.h>
28
#if defined(RTEMS_MULTIPROCESSING)
29
#include <rtems/score/mpci.h>
30
#endif
31
 
32
/*PAGE
33
 *
34
 *  _CORE_message_queue_Flush
35
 *
36
 *  This function flushes the message_queue's pending message queue.  The
37
 *  number of messages flushed from the queue is returned.
38
 *
39
 *  Input parameters:
40
 *    the_message_queue - the message_queue to be flushed
41
 *
42
 *  Output parameters:
43
 *    returns - the number of messages flushed from the queue
44
 */
45
 
46
unsigned32 _CORE_message_queue_Flush(
47
  CORE_message_queue_Control *the_message_queue
48
)
49
{
50
  if ( the_message_queue->number_of_pending_messages != 0 )
51
    return _CORE_message_queue_Flush_support( the_message_queue );
52
  else
53
    return 0;
54
}
55
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.