source: rtems/cpukit/itron/include/rtems/itron/task.h @ 6df1f64

4.104.114.84.95
Last change on this file since 6df1f64 was 6df1f64, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 28, 2005 at 11:07:14 AM

New header guards.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/**
2 * @file rtems/itron/task.h
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_H
17#define _RTEMS_ITRON_TASK_H
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems/itron/object.h>
24#include <rtems/itron/config.h>
25#include <rtems/score/thread.h>
26
27/*
28 *  This macro evaluates to TRUE if there should be a "context error."
29 *  This is defined as a blocking directive being issed from
30 *  task-independent portions or a task in dispatch disabled state.
31 *
32 *  NOTE: Dispatching is disabled in interrupts so this should cover
33 *        both cases.
34 */
35
36#define _ITRON_Is_in_non_task_state() \
37  (_Thread_Dispatch_disable_level != 0)
38
39/*
40 *  This is the API specific information required by each thread for
41 *  the ITRON API to function correctly.
42 */
43
44
45typedef struct {
46  uint32_t                  unused;  /* no use for the API extension */
47                                     /*   structure for ITRON identified yet */
48}  ITRON_API_Control;
49
50/*
51 *  The following defines the information control block used to
52 *  manage this class of objects.
53 */
54
55ITRON_EXTERN Objects_Information _ITRON_Task_Information;
56
57/*
58 *  These are used to manage the user initialization tasks.
59 */
60
61ITRON_EXTERN itron_initialization_tasks_table
62               *_ITRON_Task_User_initialization_tasks;
63ITRON_EXTERN uint32_t     _ITRON_Task_Number_of_initialization_tasks;
64
65
66/*
67 *  _ITRON_Task_Manager_initialization
68 *
69 *  This routine initializes the ITRON Task Manager.
70 */
71
72void _ITRON_Task_Manager_initialization(
73  uint32_t                          maximum_tasks,
74  uint32_t                          number_of_initialization_tasks,
75  itron_initialization_tasks_table *user_tasks
76);
77
78/*
79 *
80 *  _ITRON_Delete_task
81 */
82
83ER _ITRON_Delete_task(
84  Thread_Control *the_thread
85);
86
87/* XXX remove the need for this.  Enable dispatch should not be hidden */
88
89#define _ITRON_return_errorno( _errno )                \
90do {                                                   \
91  _Thread_Enable_dispatch();                           \
92  return _errno;                                       \
93} while (0);
94
95
96#ifndef __RTEMS_APPLICATION__
97#include <rtems/itron/task.inl>
98#endif
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif
105/* end of include file */
Note: See TracBrowser for help on using the repository browser.