source: rtems/cpukit/rtems/inline/rtems/rtems/tasks.inl @ 067a96a

4.104.114.95
Last change on this file since 067a96a was 067a96a, checked in by Joel Sherrill <joel.sherrill@…>, on 04/18/08 at 15:02:20

2008-04-18 Joel Sherrill <joel.sherrill@…>

  • rtems/include/rtems.h, rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/barriermp.h, rtems/include/rtems/rtems/cache.h, rtems/include/rtems/rtems/clock.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/event.h, rtems/include/rtems/rtems/eventmp.h, rtems/include/rtems/rtems/eventset.h, rtems/include/rtems/rtems/intr.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/mp.h, rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/object.h, rtems/include/rtems/rtems/options.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/partmp.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/regionmp.h, rtems/include/rtems/rtems/rtemsapi.h, rtems/include/rtems/rtems/sem.h, rtems/include/rtems/rtems/semmp.h, rtems/include/rtems/rtems/signal.h, rtems/include/rtems/rtems/signalmp.h, rtems/include/rtems/rtems/status.h, rtems/include/rtems/rtems/support.h, rtems/include/rtems/rtems/taskmp.h, rtems/include/rtems/rtems/tasks.h, rtems/include/rtems/rtems/timer.h, rtems/include/rtems/rtems/types.h, rtems/inline/rtems/rtems/asr.inl, rtems/inline/rtems/rtems/attr.inl, rtems/inline/rtems/rtems/barrier.inl, rtems/inline/rtems/rtems/dpmem.inl, rtems/inline/rtems/rtems/event.inl, rtems/inline/rtems/rtems/eventset.inl, rtems/inline/rtems/rtems/message.inl, rtems/inline/rtems/rtems/modes.inl, rtems/inline/rtems/rtems/options.inl, rtems/inline/rtems/rtems/part.inl, rtems/inline/rtems/rtems/ratemon.inl, rtems/inline/rtems/rtems/region.inl, rtems/inline/rtems/rtems/sem.inl, rtems/inline/rtems/rtems/status.inl, rtems/inline/rtems/rtems/support.inl, rtems/inline/rtems/rtems/tasks.inl, rtems/inline/rtems/rtems/timer.inl: Initial conversion of Classic API header files to Doxygen.
  • rtems/Doxyfile: New file.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @file rtems/rtems/tasks.inl
3 *
4 *  This file contains the static inline implementation of all inlined
5 *  routines in the with RTEMS Tasks Manager.
6 */
7
8/*  COPYRIGHT (c) 1989-2008.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 *
15 *  $Id$
16 */
17
18#ifndef _RTEMS_RTEMS_TASKS_INL
19#define _RTEMS_RTEMS_TASKS_INL
20
21/**
22 *  @addtogroup ClassicTasks
23 *  @{
24 */
25
26/**
27 *  @brief RTEMS_tasks_Allocate
28 *
29 *  This function allocates a task control block from
30 *  the inactive chain of free task control blocks.
31 */
32RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
33{
34  return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
35}
36
37/**
38 *  @brief RTEMS_tasks_Free
39 *
40 *  This routine frees a task control block to the
41 *  inactive chain of free task control blocks.
42 */
43RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
44  Thread_Control *the_task
45)
46{
47  _Objects_Free(
48    _Objects_Get_information_id( the_task->Object.id ),
49    &the_task->Object
50  );
51}
52
53/**
54 *  @brief RTEMS_tasks_Priority_to_Core
55 *
56 *  This function converts an RTEMS API priority into a core priority.
57 */
58RTEMS_INLINE_ROUTINE Priority_Control _RTEMS_tasks_Priority_to_Core(
59  rtems_task_priority   priority
60)
61{
62  return (Priority_Control) priority;
63}
64
65/**
66 *  @brief RTEMS_tasks_Priority_is_valid
67 *
68 *  This function returns TRUE if the_priority is a valid user task priority
69 *  and FALSE otherwise.
70 */
71RTEMS_INLINE_ROUTINE boolean _RTEMS_tasks_Priority_is_valid (
72  rtems_task_priority the_priority
73)
74{
75  return (  ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
76            ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
77}
78
79/**@}*/
80
81#endif
82/* end of include file */
Note: See TracBrowser for help on using the repository browser.