source: rtems/cpukit/posix/include/intr.h @ f22ebf0

4.104.114.84.95
Last change on this file since f22ebf0 was c7aa9d6, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 26, 1999 at 6:22:08 PM

Repairing damage and recovering changes including C++ wrappers..

  • Property mode set to 100644
File size: 1.6 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 *  $Id$
7 */
8
9#ifndef __POSIX_INTERRUPTS_h
10#define __POSIX_INTERRUPTS_h
11
12#ifdef __cplusplus
13extern "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
26typedef 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
44int intr_capture(
45  intr_t          intr,
46  int           (*intr_handler)( void *area ),
47  volatile void   *area,
48  size_t           areasize
49);
50
51int intr_release(
52  intr_t    intr,
53  int     (*intr_handler)( void *area )
54);
55
56int intr_lock(
57  intr_t  intr
58);
59 
60int intr_unlock(
61  intr_t  intr
62);
63 
64/*
65 *  22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76
66 */
67
68int 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 */
Note: See TracBrowser for help on using the repository browser.