source: rtems/cpukit/itron/include/rtems/itron/task.h @ eb02f47

4.104.114.84.95
Last change on this file since eb02f47 was eb02f47, checked in by Joel Sherrill <joel.sherrill@…>, on 11/10/99 at 13:48:27

Committed modifications from ITRON Task and Task Dependendent Synchronization
Working Group. Included are tests.

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