source: rtems/cpukit/score/inline/rtems/score/isr.inl @ 08311cc3

4.104.114.84.95
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*  isr.inl
2 *
3 *  This include file contains the static implementation of all
4 *  inlined routines in the Interrupt Handler.
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$
14 */
15
16#ifndef __ISR_inl
17#define __ISR_inl
18
19/*PAGE
20 *
21 *  _ISR_Is_in_progress
22 *
23 *  DESCRIPTION:
24 *
25 *  This function returns TRUE if the processor is currently servicing
26 *  and interrupt and FALSE otherwise.   A return value of TRUE indicates
27 *  that the caller is an interrupt service routine, NOT a thread.  The
28 *  directives available to an interrupt service routine are restricted.
29 */
30
31#if defined(powerpc)
32#define CPU_PROVIDES_ISR_IS_IN_PROGRESS
33#endif
34
35#ifndef CPU_PROVIDES_ISR_IS_IN_PROGRESS
36
37RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void )
38{
39  return (_ISR_Nest_level != 0);
40}
41#else
42#include <rtems/score/c_isr.inl>
43#endif
44
45/*PAGE
46 *
47 *  _ISR_Is_vector_number_valid
48 *
49 *  DESCRIPTION:
50 *
51 *  This function returns TRUE if the vector is a valid vector number
52 *  for this processor and FALSE otherwise.
53 */
54
55RTEMS_INLINE_ROUTINE boolean _ISR_Is_vector_number_valid (
56  unsigned32 vector
57)
58{
59  return ( vector <= CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER );
60}
61
62/*PAGE
63 *
64 *  _ISR_Is_valid_user_handler
65 *
66 *
67 *  DESCRIPTION:
68 *
69 *  This function returns TRUE if handler is the entry point of a valid
70 *  use interrupt service routine and FALSE otherwise.
71 */
72
73RTEMS_INLINE_ROUTINE boolean _ISR_Is_valid_user_handler (
74  void *handler
75)
76{
77  return ( handler != NULL);
78}
79
80#endif
81/* end of include file */
Note: See TracBrowser for help on using the repository browser.