source: rtems/cpukit/score/src/threadqflush.c @ 632e4306

4.104.115
Last change on this file since 632e4306 was ba42d22, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/31/08 at 03:36:04

Add attribute((unused)) to unused function args.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  Thread Queue Handler
3 *
4 *
5 *  COPYRIGHT (c) 1989-2008.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#if HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <rtems/system.h>
20#include <rtems/score/chain.h>
21#include <rtems/score/isr.h>
22#include <rtems/score/object.h>
23#include <rtems/score/states.h>
24#include <rtems/score/thread.h>
25#include <rtems/score/threadq.h>
26#include <rtems/score/tqdata.h>
27
28/*PAGE
29 *
30 *  _Thread_queue_Flush
31 *
32 *  This kernel routine flushes the given thread queue.
33 *
34 *  Input parameters:
35 *    the_thread_queue       - pointer to threadq to be flushed
36 *    remote_extract_callout - pointer to routine which extracts a remote thread
37 *    status                 - status to return to the thread
38 *
39 *  Output parameters:  NONE
40 */
41
42void _Thread_queue_Flush(
43  Thread_queue_Control       *the_thread_queue,
44#if defined(RTEMS_MULTIPROCESSING)
45  Thread_queue_Flush_callout  remote_extract_callout,
46#else
47  Thread_queue_Flush_callout  remote_extract_callout __attribute__((unused)),
48#endif
49  uint32_t                    status
50)
51{
52  Thread_Control *the_thread;
53
54  while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
55#if defined(RTEMS_MULTIPROCESSING)
56    if ( !_Objects_Is_local_id( the_thread->Object.id ) )
57      ( *remote_extract_callout )( the_thread );
58    else
59#endif
60      the_thread->Wait.return_code = status;
61  }
62}
Note: See TracBrowser for help on using the repository browser.