source: rtems/cpukit/score/src/threadqextractfifo.c @ 4fc370e

4.115
Last change on this file since 4fc370e was d4d7899, checked in by Christopher Kerl <zargyyoyo@…>, on 11/28/12 at 19:31:53

score misc: Clean up Doxygen #2 (GCI 2012)

This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.

http://www.google-melange.com/gci/task/view/google/gci2012/7986213

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 * @file
3 *
4 * @brief Removes a Thread from a Thread  Queue
5 *
6 * @ingroup ScoreThreadQ
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2008.
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/states.h>
27#include <rtems/score/thread.h>
28#include <rtems/score/threadq.h>
29#include <rtems/score/tqdata.h>
30
31void _Thread_queue_Extract_fifo(
32  Thread_queue_Control *the_thread_queue __attribute__((unused)),
33  Thread_Control       *the_thread
34)
35{
36  ISR_Level level;
37
38  _ISR_Disable( level );
39
40  if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
41    _ISR_Enable( level );
42    return;
43  }
44
45  _Chain_Extract_unprotected( &the_thread->Object.Node );
46
47  the_thread->Wait.queue = NULL;
48
49  if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
50    _ISR_Enable( level );
51  } else {
52    _Watchdog_Deactivate( &the_thread->Timer );
53    _ISR_Enable( level );
54    (void) _Watchdog_Remove( &the_thread->Timer );
55  }
56
57  _Thread_Unblock( the_thread );
58
59#if defined(RTEMS_MULTIPROCESSING)
60  if ( !_Objects_Is_local_id( the_thread->Object.id ) )
61    _Thread_MP_Free_proxy( the_thread );
62#endif
63
64}
Note: See TracBrowser for help on using the repository browser.