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

4.104.114.84.95
Last change on this file since f26145b was 0ff3df03, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/10/04 at 04:17:50

2004-12-10 Ralf Corsepius <ralf.corsepius@…>

  • posix/include/aio.h, posix/include/devctl.h, posix/include/intr.h, posix/include/mqueue.h, posix/include/sched.h, posix/include/semaphore.h, posix/src/ptimer.c, posix/src/ptimer1.c: Include <unistd.h> instead of <sys/features.h> to pick up _POSIX_* defines (Mandated by POSIX).
  • Property mode set to 100644
File size: 1.6 KB
Line 
1/**
2 * @file intr.h
3 *
4 *
5 *  XXX: It is unclear if the type "intr_t" should be defined when
6 *       _POSIX_INTERRUPT_CONTROL is not.
7 */
8 
9/*
10 *  $Id$
11 */
12
13#ifndef __POSIX_INTERRUPTS_h
14#define __POSIX_INTERRUPTS_h
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#include <unistd.h>
21#include <sys/types.h>
22#include <sys/time.h>
23
24#if defined(_POSIX_INTERRUPT_CONTROL)
25
26/*
27 *  22.2 Concepts, P1003.4b/D8, p. 73
28 */
29
30typedef int intr_t;
31
32/*
33 *  22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74
34 */
35
36/*
37 *  Return codes from an interrupt handler
38 */
39
40#define INTR_HANDLED_NOTIFY         0 /* ISR handled this interrupt, notify */
41                                      /*   the thread that registered the */
42                                      /*   ISR that the interrupt occurred. */
43#define INTR_HANDLED_DO_NOT_NOTIFY  1 /* ISR handled this interrupt, but */
44                                      /*   do NOT perform notification. */
45#define INTR_NOT_HANDLED            2 /* ISR did not handle this interrupt, */
46                                      /*   let the next handler try. */
47
48int intr_capture(
49  intr_t          intr,
50  int           (*intr_handler)( void *area ),
51  volatile void   *area,
52  size_t           areasize
53);
54
55int intr_release(
56  intr_t    intr,
57  int     (*intr_handler)( void *area )
58);
59
60int intr_lock(
61  intr_t  intr
62);
63
64int intr_unlock(
65  intr_t  intr
66);
67
68/*
69 *  22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76
70 */
71
72int intr_timed_wait(
73  int                     flags,
74  const struct timespec  *timeout
75);
76
77#endif
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif
84/* end of include file */
Note: See TracBrowser for help on using the repository browser.