1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Inlined Routines Associated with the Manipulation of the |
---|
5 | * Priority-Based Scheduling Structures |
---|
6 | * |
---|
7 | * This inline file contains all of the inlined routines associated with |
---|
8 | * the manipulation of the priority-based scheduling structures. |
---|
9 | */ |
---|
10 | |
---|
11 | /* |
---|
12 | * Copyright (C) 2011 On-Line Applications Research Corporation (OAR). |
---|
13 | * |
---|
14 | * The license and distribution terms for this file may be |
---|
15 | * found in the file LICENSE in this distribution or at |
---|
16 | * http://www.rtems.com/license/LICENSE. |
---|
17 | */ |
---|
18 | |
---|
19 | #ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_H |
---|
20 | # error "Never use <rtems/score/schedulersimple.inl> directly; include <rtems/score/schedulersimple.h> instead." |
---|
21 | #endif |
---|
22 | |
---|
23 | #ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_INL |
---|
24 | #define _RTEMS_SCORE_SCHEDULERSIMPLE_INL |
---|
25 | |
---|
26 | #include <rtems/score/thread.h> |
---|
27 | |
---|
28 | /** |
---|
29 | * @addtogroup ScoreScheduler |
---|
30 | * |
---|
31 | * @{ |
---|
32 | */ |
---|
33 | |
---|
34 | /** |
---|
35 | * This routine puts @a the_thread on to the ready queue. |
---|
36 | * |
---|
37 | * @param[in] the_ready_queue is a pointer to the ready queue head |
---|
38 | * @param[in] the_thread is the thread to be blocked |
---|
39 | */ |
---|
40 | RTEMS_INLINE_ROUTINE void _Scheduler_simple_Ready_queue_requeue( |
---|
41 | Scheduler_Control *the_ready_queue, |
---|
42 | Thread_Control *the_thread |
---|
43 | ) |
---|
44 | { |
---|
45 | /* extract */ |
---|
46 | _Chain_Extract_unprotected( &the_thread->Object.Node ); |
---|
47 | |
---|
48 | /* enqueue */ |
---|
49 | _Scheduler_simple_Ready_queue_enqueue( the_thread ); |
---|
50 | } |
---|
51 | |
---|
52 | /** @} */ |
---|
53 | |
---|
54 | #endif |
---|
55 | /* end of include file */ |
---|