source: rtems/cpukit/itron/macros/rtems/itron/task.inl @ 15096905

4.104.114.84.95
Last change on this file since 15096905 was 15096905, checked in by Joel Sherrill <joel.sherrill@…>, on 03/08/06 at 18:53:44

2006-03-08 Joel Sherrill <joel@…>

  • itron/macros/rtems/itron/semaphore.inl, itron/macros/rtems/itron/task.inl: Fix warnings.
  • posix/macros/rtems/posix/cond.inl: Fix typo.
  • score/macros/rtems/score/heap.inl: Fix missed type change.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/**
2 * @file rtems/itron/task.inl
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef _RTEMS_ITRON_TASK_INL
17#define _RTEMS_ITRON_TASK_INL
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/*
24 *  _ITRON_Task_Allocate
25 */
26
27#define _ITRON_Task_Allocate( _tskid ) \
28  (Thread_Control *)_ITRON_Objects_Allocate_by_index( \
29    &_ITRON_Task_Information, \
30    (_tskid), \
31    sizeof(Thread_Control) \
32  )
33
34/*
35 *  _ITRON_Task_Clarify_allocation_id_error
36 */
37
38#define _ITRON_Task_Clarify_allocation_id_error( _id ) \
39  _ITRON_Objects_Clarify_allocation_id_error( \
40      &_ITRON_Task_Information, (_id) )
41
42/*
43 *  _ITRON_Task_Clarify_get_id_error
44 */
45
46#define _ITRON_Task_Clarify_get_id_error( _id ) \
47 _ITRON_Objects_Clarify_get_id_error( &_ITRON_Task_Information, (_id) )
48
49/*
50 *  _ITRON_Task_Free
51 */
52
53#define _ITRON_Task_Free( _the_task ) \
54  _ITRON_Objects_Free( &_ITRON_Task_Information, &(_the_task)->Object )
55
56/*PAGE
57 *
58 *  _ITRON_Task_Get
59 */
60
61/* XXX fix me */
62static inline Thread_Control *_ITRON_Task_Get (
63  ID                 id,
64  Objects_Locations *location
65)
66{
67  if ( id == 0 ) {
68    _Thread_Disable_dispatch();
69    *location = OBJECTS_LOCAL;
70    return _Thread_Executing;
71  }
72
73  return (Thread_Control *)
74    _ITRON_Objects_Get( &_ITRON_Task_Information, id, location );
75}
76
77/*PAGE
78 *
79 *  _ITRON_Task_Is_null
80 */
81
82#define _ITRON_Task_Is_null( _the_task ) \
83  ( (_the_task) == NULL )
84
85/*PAGE
86 *
87 *  _ITRON_tasks_Priority_to_Core
88 */
89 
90#define _ITRON_Task_Priority_to_Core( _ITRON_priority ) \
91  ((Priority_Control) (_ITRON_priority))
92
93/*PAGE
94 *
95 *  _ITRON_tasks_Core_to_Priority
96 */
97 
98#define _ITRON_Task_Core_to_Priority( _core_priority ) \
99  ((PRI) (_core_priority))
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif
106/* end of include file */
Note: See TracBrowser for help on using the repository browser.