source: rtems/cpukit/rtems/inline/rtems/rtems/tasks.inl @ 6c06288

4.104.114.95
Last change on this file since 6c06288 was 6c06288, checked in by Joel Sherrill <joel.sherrill@…>, on 01/29/08 at 21:52:21

2008-01-29 Joel Sherrill <joel.sherrill@…>

  • itron/src/exd_tsk.c, itron/src/task.c, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-symbols.c, posix/src/cancelrun.c, posix/src/pthreadexit.c, rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h, rtems/include/rtems/rtems/support.h, rtems/inline/rtems/rtems/tasks.inl, rtems/src/eventmp.c, rtems/src/msgmp.c, rtems/src/partmp.c, rtems/src/regionmp.c, rtems/src/rtemsobjectgetname.c, rtems/src/semmp.c, rtems/src/signalmp.c, rtems/src/taskdelete.c, rtems/src/taskmp.c, rtems/src/timerserver.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl, score/src/Unlimited.txt, score/src/objectgetnameasstring.c, score/src/threadqextractwithproxy.c: Add new Object Services collection. This changed the name of a few previously public but undocumented services and added a some new services.
  • rtems/include/rtems/rtems/object.h, rtems/src/rtemsbuildid.c, rtems/src/rtemsbuildname.c, rtems/src/rtemsobjectapimaximumclass.c, rtems/src/rtemsobjectapiminimumclass.c, rtems/src/rtemsobjectgetapiclassname.c, rtems/src/rtemsobjectgetapiname.c, rtems/src/rtemsobjectgetclassicname.c, rtems/src/rtemsobjectgetclassinfo.c, rtems/src/rtemsobjectidapimaximum.c, rtems/src/rtemsobjectidapiminimum.c, rtems/src/rtemsobjectidgetapi.c, rtems/src/rtemsobjectidgetclass.c, rtems/src/rtemsobjectidgetindex.c, rtems/src/rtemsobjectidgetnode.c, rtems/src/rtemsobjectsetname.c, score/src/objectapimaximumclass.c, score/src/objectgetinfo.c, score/src/objectgetinfoid.c, score/src/objectsetname.c: New files.
  • rtems/src/rtemsidtoname.c: Removed.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @file rtems/rtems/tasks.inl
3 */
4
5/*
6 *  This file contains the static inline implementation of all inlined
7 *  routines in the with RTEMS Tasks Manager.
8 *
9 *  COPYRIGHT (c) 1989-2008.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef _RTEMS_RTEMS_TASKS_INL
20#define _RTEMS_RTEMS_TASKS_INL
21
22/*PAGE
23 *
24 *  _RTEMS_tasks_Allocate
25 *
26 *  DESCRIPTION:
27 *
28 *  This function allocates a task control block from
29 *  the inactive chain of free task control blocks.
30 */
31
32RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
33{
34  return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
35}
36
37/*PAGE
38 *
39 *  _RTEMS_tasks_Free
40 *
41 *  DESCRIPTION:
42 *
43 *  This routine frees a task control block to the
44 *  inactive chain of free task control blocks.
45 */
46
47RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
48  Thread_Control *the_task
49)
50{
51  _Objects_Free(
52    _Objects_Get_information_id( the_task->Object.id ),
53    &the_task->Object
54  );
55}
56
57/*PAGE
58 *
59 *  _RTEMS_tasks_Priority_to_Core
60 *
61 *  DESCRIPTION:
62 *
63 *  This function converts an RTEMS API priority into a core priority.
64 */
65 
66RTEMS_INLINE_ROUTINE Priority_Control _RTEMS_tasks_Priority_to_Core(
67  rtems_task_priority   priority
68)
69{
70  return (Priority_Control) priority;
71}
72
73/*PAGE
74 *
75 *  _RTEMS_tasks_Priority_is_valid
76 *
77 *  DESCRIPTION:
78 *
79 *  This function returns TRUE if the_priority is a valid user task priority
80 *  and FALSE otherwise.
81 */
82 
83RTEMS_INLINE_ROUTINE boolean _RTEMS_tasks_Priority_is_valid (
84  rtems_task_priority the_priority
85)
86{
87  return (  ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
88            ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
89}
90
91#endif
92/* end of include file */
Note: See TracBrowser for help on using the repository browser.