source: rtems/cpukit/score/src/threadqextract.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 933 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Extracts Thread from 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.org/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/score/threadqimpl.h>
23
24bool _Thread_queue_Extract(
25  Thread_queue_Control *the_thread_queue,
26  Thread_Control       *the_thread
27)
28{
29  /*
30   * Can not use indirect function pointer here since Extract priority
31   * is a macro and the underlying methods do not have the same signature.
32   */
33  if  ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
34    return _Thread_queue_Extract_priority( the_thread );
35  else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
36    return _Thread_queue_Extract_fifo( the_thread );
37
38}
Note: See TracBrowser for help on using the repository browser.