OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [exec/] [itron/] [include/] [rtems/] [itron/] [task.h] - Blame information for rev 158

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.