source: rtems/cpukit/posix/include/intr.h @ 5e9b32b

4.104.114.84.95
Last change on this file since 5e9b32b was 5e9b32b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/26/95 at 19:27:15

posix support initially added

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/* 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
7#ifndef __POSIX_INTERRUPTS_h
8#define __POSIX_INTERRUPTS_h
9
10#include <rtems/posix/features.h>
11#include <sys/types.h>
12#include <sys/time.h>
13
14#if defined(_POSIX_INTERRUPT_CONTROL)
15
16/*
17 *  22.2 Concepts, P1003.4b/D8, p. 73
18 */
19
20typedef int intr_t;
21
22/*
23 *  22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74
24 */
25
26/*
27 *  Return codes from an interrupt handler
28 */
29
30#define INTR_HANDLED_NOTIFY         0 /* ISR handled this interrupt, notify */
31                                      /*   the thread that registered the */
32                                      /*   ISR that the interrupt occurred. */
33#define INTR_HANDLED_DO_NOT_NOTIFY  1 /* ISR handled this interrupt, but */
34                                      /*   do NOT perform notification. */
35#define INTR_NOT_HANDLED            2 /* ISR did not handle this interrupt, */
36                                      /*   let the next handler try. */
37
38int intr_capture(
39  intr_t          intr,
40  int           (*intr_handler)( void *area ),
41  volatile void   *area,
42  size_t           areasize
43);
44
45int intr_release(
46  intr_t    intr,
47  int     (*intr_handler)( void *area )
48);
49
50int intr_lock(
51  intr_t  intr
52);
53 
54int intr_unlock(
55  intr_t  intr
56);
57 
58/*
59 *  22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76
60 */
61
62int intr_timed_wait(
63  int                     flags,
64  const struct timespec  *timeout
65);
66
67#endif
68
69#endif
70/* end of include file */
Note: See TracBrowser for help on using the repository browser.