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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [inline/] [rtems/] [score/] [isr.inl] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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: isr.inl,v 1.2 2001-09-27 11:59:34 chris Exp $
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
 
37
RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void )
38
{
39
  return (_ISR_Nest_level != 0);
40
}
41
#else
42
#include 
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
 
55
RTEMS_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
 
73
RTEMS_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 */

powered by: WebSVN 2.1.0

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