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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [include/] [rtems/] [posix/] [intr.h] - Blame information for rev 30

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

Line No. Rev Author Line
1 30 unneback
/*  rtems/posix/intr.h
2
 *
3
 *  This include file contains all the private support information for
4
 *  POSIX Interrupt Manager.
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.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id: intr.h,v 1.2 2001-09-27 11:59:14 chris Exp $
14
 */
15
 
16
#ifndef __RTEMS_POSIX_KEY_h
17
#define __RTEMS_POSIX_KEY_h
18
 
19
#ifdef __cplusplus
20
extern "C" {
21
#endif
22
 
23
#include <rtems/score/isr.h>
24
#include <rtems/score/object.h>
25
 
26
/*
27
 *  Data Structure used to manage each POSIX Interrupt Vector
28
 */
29
 
30
typedef struct {
31
  int            number_installed;
32
  int            lock_count;
33
  int            deferred_count;
34
  Chain_Control  Handlers;
35
} POSIX_Interrupt_Control;
36
 
37
/*
38
 *  Data Structure used to manage a POSIX Interrupt Handler
39
 */
40
 
41
typedef struct {
42
  Objects_Control         Object;
43
  int                     is_active;
44
  intr_t                  vector;
45
  Thread_Control         *server;
46
  int                   (*handler)( void *area );
47
  volatile void           *user_data_area;
48
}  POSIX_Interrupt_Handler_control;
49
 
50
/*
51
 *  The following defines the information control block used to manage
52
 *  this class of objects.
53
 */
54
 
55
POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information;
56
 
57
/*
58
 *  The following is an array which is used to manage the set of
59
 *  interrupt handlers installed on each vector.
60
 */
61
 
62
POSIX_EXTERN POSIX_Interrupt_Control
63
               _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ];
64
 
65
/*
66
 *  _POSIX_Interrupt_Manager_initialization
67
 *
68
 *  DESCRIPTION:
69
 *
70
 *  This routine performs the initialization necessary for this manager.
71
 */
72
 
73
void _POSIX_Interrupt_Manager_initialization(
74
  unsigned32  maximum_interrupt_handlers
75
);
76
 
77
/*
78
 *  _POSIX_Interrupt_Allocate
79
 *
80
 *  DESCRIPTION:
81
 *
82
 *  This function allocates a interrupt handler control block from
83
 *  the inactive chain of free interrupt handler control blocks.
84
 */
85
 
86
RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control *
87
  _POSIX_Interrupt_Allocate( void );
88
 
89
/*
90
 *  _POSIX_Interrupt_Free
91
 *
92
 *  DESCRIPTION:
93
 *
94
 *  This routine frees a interrupt handler control block to the
95
 *  inactive chain of free interrupt handler control blocks.
96
 */
97
 
98
RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free (
99
  POSIX_Interrupt_Handler_control *the_intr
100
);
101
 
102
/*
103
 *  _POSIX_Interrupt_Get
104
 *
105
 *  DESCRIPTION:
106
 *
107
 *  This function maps interrupt handler IDs to interrupt handler control
108
 *  blocks.  If ID corresponds to a local interrupt handler, then it returns
109
 *  the_intr control pointer which maps to ID and location
110
 *  is set to OBJECTS_LOCAL.  if the interrupt handler ID is global and
111
 *  resides on a remote node, then location is set to OBJECTS_REMOTE,
112
 *  and the_intr is undefined.  Otherwise, location is set
113
 *  to OBJECTS_ERROR and the_intr is undefined.
114
 */
115
 
116
RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get (
117
  Objects_Id         id,
118
  Objects_Locations *location
119
);
120
 
121
/*
122
 *  _POSIX_Interrupt_Is_null
123
 *
124
 *  DESCRIPTION:
125
 *
126
 *  This function returns TRUE if the_intr is NULL and FALSE otherwise.
127
 */
128
 
129
RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null (
130
  POSIX_Interrupt_Handler_control *the_intr
131
);
132
 
133
/*
134
 *  _POSIX_Interrupt_Handler
135
 *
136
 *  DESCRIPTION:
137
 *
138
 *  This function XXX.
139
 */
140
 
141
void _POSIX_Interrupt_Handler(
142
  ISR_Vector_number   vector
143
);
144
 
145
#include <rtems/posix/intr.inl>
146
 
147
#ifdef __cplusplus
148
}
149
#endif
150
 
151
#endif
152
/*  end of include file */
153
 

powered by: WebSVN 2.1.0

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