blob: 34b424823e31755a45276dae90e00fc7b0682ff3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/**
* @file rtems/itron/task.h
*/
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef _RTEMS_ITRON_TASK_H
#define _RTEMS_ITRON_TASK_H
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/itron/object.h>
#include <rtems/itron/config.h>
#include <rtems/score/thread.h>
/*
* This macro evaluates to TRUE if there should be a "context error."
* This is defined as a blocking directive being issed from
* task-independent portions or a task in dispatch disabled state.
*
* NOTE: Dispatching is disabled in interrupts so this should cover
* both cases.
*/
#define _ITRON_Is_in_non_task_state() \
(_Thread_Dispatch_disable_level != 0)
/*
* This is the API specific information required by each thread for
* the ITRON API to function correctly.
*/
typedef struct {
uint32_t unused; /* no use for the API extension */
/* structure for ITRON identified yet */
} ITRON_API_Control;
/*
* The following defines the information control block used to
* manage this class of objects.
*/
ITRON_EXTERN Objects_Information _ITRON_Task_Information;
/*
* These are used to manage the user initialization tasks.
*/
ITRON_EXTERN itron_initialization_tasks_table
*_ITRON_Task_User_initialization_tasks;
ITRON_EXTERN uint32_t _ITRON_Task_Number_of_initialization_tasks;
/*
* _ITRON_Task_Manager_initialization
*
* This routine initializes the ITRON Task Manager.
*/
void _ITRON_Task_Manager_initialization(
uint32_t maximum_tasks,
uint32_t number_of_initialization_tasks,
itron_initialization_tasks_table *user_tasks
);
/*
* Return a status code and enable dispatching
*/
#define _ITRON_return_errorno( _errno ) \
do { \
_Thread_Enable_dispatch(); \
return _errno; \
} while (0);
#ifndef __RTEMS_APPLICATION__
#include <rtems/itron/task.inl>
#endif
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */
|