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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [include/] [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
/* intr.h
2
 *
3
 *  XXX: It is unclear if the type "intr_t" should be defined when
4
 *       _POSIX_INTERRUPT_CONTROL is not.
5
 *
6
 *  $Id: intr.h,v 1.2 2001-09-27 11:59:13 chris Exp $
7
 */
8
 
9
#ifndef __POSIX_INTERRUPTS_h
10
#define __POSIX_INTERRUPTS_h
11
 
12
#ifdef __cplusplus
13
extern "C" {
14
#endif
15
 
16
#include <sys/features.h>
17
#include <sys/types.h>
18
#include <sys/time.h>
19
 
20
#if defined(_POSIX_INTERRUPT_CONTROL)
21
 
22
/*
23
 *  22.2 Concepts, P1003.4b/D8, p. 73
24
 */
25
 
26
typedef int intr_t;
27
 
28
/*
29
 *  22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74
30
 */
31
 
32
/*
33
 *  Return codes from an interrupt handler
34
 */
35
 
36
#define INTR_HANDLED_NOTIFY         0 /* ISR handled this interrupt, notify */
37
                                      /*   the thread that registered the */
38
                                      /*   ISR that the interrupt occurred. */
39
#define INTR_HANDLED_DO_NOT_NOTIFY  1 /* ISR handled this interrupt, but */
40
                                      /*   do NOT perform notification. */
41
#define INTR_NOT_HANDLED            2 /* ISR did not handle this interrupt, */
42
                                      /*   let the next handler try. */
43
 
44
int intr_capture(
45
  intr_t          intr,
46
  int           (*intr_handler)( void *area ),
47
  volatile void   *area,
48
  size_t           areasize
49
);
50
 
51
int intr_release(
52
  intr_t    intr,
53
  int     (*intr_handler)( void *area )
54
);
55
 
56
int intr_lock(
57
  intr_t  intr
58
);
59
 
60
int intr_unlock(
61
  intr_t  intr
62
);
63
 
64
/*
65
 *  22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76
66
 */
67
 
68
int intr_timed_wait(
69
  int                     flags,
70
  const struct timespec  *timeout
71
);
72
 
73
#endif
74
 
75
#ifdef __cplusplus
76
}
77
#endif
78
 
79
#endif
80
/* end of include file */

powered by: WebSVN 2.1.0

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