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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [kernel/] [v2_0/] [include/] [intr.hxx] - Diff between revs 27 and 174

Only display areas with differences | Details | Blame | View Log

Rev 27 Rev 174
#ifndef CYGONCE_KERNEL_INTR_HXX
#ifndef CYGONCE_KERNEL_INTR_HXX
#define CYGONCE_KERNEL_INTR_HXX
#define CYGONCE_KERNEL_INTR_HXX
//==========================================================================
//==========================================================================
//
//
//      intr.hxx
//      intr.hxx
//
//
//      Interrupt class declaration(s)
//      Interrupt class declaration(s)
//
//
//==========================================================================
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
//
//
// eCos is free software; you can redistribute it and/or modify it under
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
// Software Foundation; either version 2 or (at your option) any later version.
//
//
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for more details.
// for more details.
//
//
// You should have received a copy of the GNU General Public License along
// You should have received a copy of the GNU General Public License along
// with eCos; if not, write to the Free Software Foundation, Inc.,
// with eCos; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
//
//
// As a special exception, if other files instantiate templates or use macros
// As a special exception, if other files instantiate templates or use macros
// or inline functions from this file, or you compile this file and link it
// or inline functions from this file, or you compile this file and link it
// with other works to produce a work based on this file, this file does not
// with other works to produce a work based on this file, this file does not
// by itself cause the resulting work to be covered by the GNU General Public
// by itself cause the resulting work to be covered by the GNU General Public
// License. However the source code for this file must still be made available
// License. However the source code for this file must still be made available
// in accordance with section (3) of the GNU General Public License.
// in accordance with section (3) of the GNU General Public License.
//
//
// This exception does not invalidate any other reasons why a work based on
// This exception does not invalidate any other reasons why a work based on
// this file might be covered by the GNU General Public License.
// this file might be covered by the GNU General Public License.
//
//
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
// at http://sources.redhat.com/ecos/ecos-license/
// at http://sources.redhat.com/ecos/ecos-license/
// -------------------------------------------
// -------------------------------------------
//####ECOSGPLCOPYRIGHTEND####
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
//==========================================================================
//#####DESCRIPTIONBEGIN####
//#####DESCRIPTIONBEGIN####
//
//
// Author(s):   nickg
// Author(s):   nickg
// Contributors:        nickg
// Contributors:        nickg
// Date:        1997-09-09
// Date:        1997-09-09
// Purpose:     Define Interrupt class interfaces
// Purpose:     Define Interrupt class interfaces
// Description: The classes defined here provide the APIs for handling
// Description: The classes defined here provide the APIs for handling
//              interrupts.
//              interrupts.
// Usage:       #include "intr.hxx"
// Usage:       #include "intr.hxx"
//
//
//
//
//####DESCRIPTIONEND####
//####DESCRIPTIONEND####
//
//
//==========================================================================
//==========================================================================
#include 
#include 
#include 
#include 
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Default definitions
// Default definitions
// Some HALs define the ISR table to be a different size to the number
// Some HALs define the ISR table to be a different size to the number
// of ISR vectors. These HALs will define CYGNUM_HAL_ISR_TABLE_SIZE. All
// of ISR vectors. These HALs will define CYGNUM_HAL_ISR_TABLE_SIZE. All
// other HALs will have the table size equal to the number of vectors.
// other HALs will have the table size equal to the number of vectors.
#ifndef CYGNUM_HAL_ISR_TABLE_SIZE
#ifndef CYGNUM_HAL_ISR_TABLE_SIZE
# define CYGNUM_HAL_ISR_TABLE_SIZE      CYGNUM_HAL_ISR_COUNT
# define CYGNUM_HAL_ISR_TABLE_SIZE      CYGNUM_HAL_ISR_COUNT
#endif
#endif
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Function prototype typedefs
// Function prototype typedefs
// VSR = Vector Service Routine. This is the code attached directly to an
// VSR = Vector Service Routine. This is the code attached directly to an
// interrupt vector. It is very architecture/platform specific and usually
// interrupt vector. It is very architecture/platform specific and usually
// must be written in assembler.
// must be written in assembler.
typedef void  cyg_VSR();
typedef void  cyg_VSR();
// ISR = Interrupt Service Routine. This is called from the default
// ISR = Interrupt Service Routine. This is called from the default
// VSR in response to an interrupt. It may access shared data but may
// VSR in response to an interrupt. It may access shared data but may
// not call kernel routines. The return value may be
// not call kernel routines. The return value may be
// Cyg_Interrupt::HANDLED and/or Cyg_Interrupt::CALL_DSR.
// Cyg_Interrupt::HANDLED and/or Cyg_Interrupt::CALL_DSR.
typedef cyg_uint32 cyg_ISR(cyg_vector vector, CYG_ADDRWORD data);
typedef cyg_uint32 cyg_ISR(cyg_vector vector, CYG_ADDRWORD data);
// DSR = Deferred Service Routine. This is called if the ISR returns
// DSR = Deferred Service Routine. This is called if the ISR returns
// the Cyg_Interrupt::CALL_DSR bit. It is called at a "safe" point in
// the Cyg_Interrupt::CALL_DSR bit. It is called at a "safe" point in
// the kernel where it may make calls on kernel routines. The count
// the kernel where it may make calls on kernel routines. The count
// argument indicates how many times the ISR has asked for the DSR to
// argument indicates how many times the ISR has asked for the DSR to
// be posted since the last time the DSR ran.
// be posted since the last time the DSR ran.
typedef void cyg_DSR(cyg_vector vector, cyg_ucount32 count, CYG_ADDRWORD data);
typedef void cyg_DSR(cyg_vector vector, cyg_ucount32 count, CYG_ADDRWORD data);
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Include HAL definitions
// Include HAL definitions
class Cyg_Interrupt;
class Cyg_Interrupt;
#include 
#include 
#include 
#include 
#ifndef HAL_INTERRUPT_STACK_CALL_PENDING_DSRS
#ifndef HAL_INTERRUPT_STACK_CALL_PENDING_DSRS
#define HAL_INTERRUPT_STACK_CALL_PENDING_DSRS()    \
#define HAL_INTERRUPT_STACK_CALL_PENDING_DSRS()    \
      Cyg_Interrupt::call_pending_DSRs_inner()
      Cyg_Interrupt::call_pending_DSRs_inner()
#endif
#endif
externC void interrupt_end(
externC void interrupt_end(
    cyg_uint32          isr_ret,
    cyg_uint32          isr_ret,
    Cyg_Interrupt       *intr,
    Cyg_Interrupt       *intr,
    HAL_SavedRegisters  *ctx
    HAL_SavedRegisters  *ctx
    );
    );
externC void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj );
externC void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj );
externC void cyg_interrupt_call_pending_DSRs( void );
externC void cyg_interrupt_call_pending_DSRs( void );
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Interrupt class. This both represents each interrupt and provides a static
// Interrupt class. This both represents each interrupt and provides a static
// interface for controlling the interrupt hardware.
// interface for controlling the interrupt hardware.
class Cyg_Interrupt
class Cyg_Interrupt
{
{
    friend class Cyg_Scheduler;
    friend class Cyg_Scheduler;
    friend void interrupt_end( cyg_uint32,
    friend void interrupt_end( cyg_uint32,
                               Cyg_Interrupt *,
                               Cyg_Interrupt *,
                               HAL_SavedRegisters *);
                               HAL_SavedRegisters *);
    friend void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj );
    friend void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj );
    friend void cyg_interrupt_call_pending_DSRs( void );
    friend void cyg_interrupt_call_pending_DSRs( void );
    cyg_vector          vector;         // Interrupt vector
    cyg_vector          vector;         // Interrupt vector
    cyg_priority        priority;       // Queuing priority
    cyg_priority        priority;       // Queuing priority
    cyg_ISR             *isr;           // Pointer to ISR
    cyg_ISR             *isr;           // Pointer to ISR
    cyg_DSR             *dsr;           // Pointer to DSR
    cyg_DSR             *dsr;           // Pointer to DSR
    CYG_ADDRWORD        data;           // Data pointer
    CYG_ADDRWORD        data;           // Data pointer
    // DSR handling interface called by the scheduler
    // DSR handling interface called by the scheduler
                                        // Check for pending DSRs
                                        // Check for pending DSRs
    static cyg_bool     DSRs_pending();
    static cyg_bool     DSRs_pending();
                                        // Call any pending DSRs
                                        // Call any pending DSRs
    static void         call_pending_DSRs();
    static void         call_pending_DSRs();
    static void         call_pending_DSRs_inner();
    static void         call_pending_DSRs_inner();
    // DSR handling interface called by the scheduler and HAL
    // DSR handling interface called by the scheduler and HAL
    // interrupt arbiters.
    // interrupt arbiters.
    void                post_dsr();     // Post the DSR for this interrupt
    void                post_dsr();     // Post the DSR for this interrupt
    // Data structures for handling DSR calls.  We implement two DSR
    // Data structures for handling DSR calls.  We implement two DSR
    // handling mechanisms, a list based one and a table based
    // handling mechanisms, a list based one and a table based
    // one. The list based mechanism is safe with respect to temporary
    // one. The list based mechanism is safe with respect to temporary
    // overloads and will not run out of resource. However it requires
    // overloads and will not run out of resource. However it requires
    // extra data per interrupt object, and interrupts must be turned
    // extra data per interrupt object, and interrupts must be turned
    // off briefly when delivering the DSR. The table based mechanism
    // off briefly when delivering the DSR. The table based mechanism
    // does not need unnecessary interrupt switching, but may be prone
    // does not need unnecessary interrupt switching, but may be prone
    // to overflow on overload. However, since a correctly programmed
    // to overflow on overload. However, since a correctly programmed
    // real time application should not experience such a condition,
    // real time application should not experience such a condition,
    // the table based mechanism is more efficient for real use. The
    // the table based mechanism is more efficient for real use. The
    // list based mechainsm is enabled by default since it is safer to
    // list based mechainsm is enabled by default since it is safer to
    // use during development.
    // use during development.
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
    static Cyg_Interrupt *dsr_table[CYGNUM_KERNEL_CPU_MAX]
    static Cyg_Interrupt *dsr_table[CYGNUM_KERNEL_CPU_MAX]
                                   [CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE]
                                   [CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE]
                                   CYGBLD_ANNOTATE_VARIABLE_INTR;
                                   CYGBLD_ANNOTATE_VARIABLE_INTR;
    static cyg_ucount32 dsr_table_head[CYGNUM_KERNEL_CPU_MAX]
    static cyg_ucount32 dsr_table_head[CYGNUM_KERNEL_CPU_MAX]
                                      CYGBLD_ANNOTATE_VARIABLE_INTR;
                                      CYGBLD_ANNOTATE_VARIABLE_INTR;
    static volatile cyg_ucount32 dsr_table_tail[CYGNUM_KERNEL_CPU_MAX]
    static volatile cyg_ucount32 dsr_table_tail[CYGNUM_KERNEL_CPU_MAX]
                                               CYGBLD_ANNOTATE_VARIABLE_INTR;
                                               CYGBLD_ANNOTATE_VARIABLE_INTR;
#endif
#endif
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
    // Number of DSR posts made
    // Number of DSR posts made
    volatile cyg_ucount32 dsr_count CYGBLD_ANNOTATE_VARIABLE_INTR;
    volatile cyg_ucount32 dsr_count CYGBLD_ANNOTATE_VARIABLE_INTR;
    // next DSR in list
    // next DSR in list
    Cyg_Interrupt* volatile next_dsr CYGBLD_ANNOTATE_VARIABLE_INTR;
    Cyg_Interrupt* volatile next_dsr CYGBLD_ANNOTATE_VARIABLE_INTR;
    // static list of pending DSRs
    // static list of pending DSRs
    static Cyg_Interrupt* volatile dsr_list[CYGNUM_KERNEL_CPU_MAX]
    static Cyg_Interrupt* volatile dsr_list[CYGNUM_KERNEL_CPU_MAX]
                                           CYGBLD_ANNOTATE_VARIABLE_INTR;
                                           CYGBLD_ANNOTATE_VARIABLE_INTR;
#endif
#endif
#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
    // The default mechanism for handling interrupts is to attach just
    // The default mechanism for handling interrupts is to attach just
    // one Interrupt object to each vector. In some cases, and on some
    // one Interrupt object to each vector. In some cases, and on some
    // hardware, this is not possible, and each vector must carry a chain
    // hardware, this is not possible, and each vector must carry a chain
    // of interrupts.
    // of interrupts.
    Cyg_Interrupt       *next;          // Next Interrupt in list
    Cyg_Interrupt       *next;          // Next Interrupt in list
    // Chaining ISR inserted in HAL vector
    // Chaining ISR inserted in HAL vector
    static cyg_uint32 chain_isr(cyg_vector vector, CYG_ADDRWORD data);
    static cyg_uint32 chain_isr(cyg_vector vector, CYG_ADDRWORD data);
    // Table of interrupt chains
    // Table of interrupt chains
    static Cyg_Interrupt *chain_list[CYGNUM_HAL_ISR_TABLE_SIZE];
    static Cyg_Interrupt *chain_list[CYGNUM_HAL_ISR_TABLE_SIZE];
#endif
#endif
    // Interrupt disable data. Interrupt disable can be nested. On
    // Interrupt disable data. Interrupt disable can be nested. On
    // each CPU this is controlled by disable_counter[cpu]. When the
    // each CPU this is controlled by disable_counter[cpu]. When the
    // counter is first incremented from zero to one, the
    // counter is first incremented from zero to one, the
    // interrupt_disable_spinlock is claimed using spin_intsave(), the
    // interrupt_disable_spinlock is claimed using spin_intsave(), the
    // original interrupt enable state being saved in
    // original interrupt enable state being saved in
    // interrupt_disable_state[cpu].  When the counter is decremented
    // interrupt_disable_state[cpu].  When the counter is decremented
    // back to zero the spinlock is cleared using clear_intsave().
    // back to zero the spinlock is cleared using clear_intsave().
    // The spinlock is necessary in SMP systems since a thread
    // The spinlock is necessary in SMP systems since a thread
    // accessing data shared with an ISR may be scheduled on a
    // accessing data shared with an ISR may be scheduled on a
    // different CPU to the one that handles the interrupt. So, merely
    // different CPU to the one that handles the interrupt. So, merely
    // blocking local interrupts would be ineffective. SMP aware
    // blocking local interrupts would be ineffective. SMP aware
    // device drivers should either use their own spinlocks to protect
    // device drivers should either use their own spinlocks to protect
    // data, or use the API supported by this class, via
    // data, or use the API supported by this class, via
    // cyg_drv_isr_lock()/_unlock(). Note that it now becomes
    // cyg_drv_isr_lock()/_unlock(). Note that it now becomes
    // essential that ISRs do this if they are to be SMP-compatible.
    // essential that ISRs do this if they are to be SMP-compatible.
    // In a single CPU system, this mechanism reduces to just
    // In a single CPU system, this mechanism reduces to just
    // disabling/enabling interrupts.
    // disabling/enabling interrupts.
    // Disable level counter. This counts the number of times
    // Disable level counter. This counts the number of times
    // interrupts have been disabled.
    // interrupts have been disabled.
    static volatile cyg_int32 disable_counter[CYGNUM_KERNEL_CPU_MAX]
    static volatile cyg_int32 disable_counter[CYGNUM_KERNEL_CPU_MAX]
                                              CYGBLD_ANNOTATE_VARIABLE_INTR;
                                              CYGBLD_ANNOTATE_VARIABLE_INTR;
    // Interrupt disable spinlock. This is claimed by any CPU that has
    // Interrupt disable spinlock. This is claimed by any CPU that has
    // disabled interrupts via the Cyg_Interrupt API.
    // disabled interrupts via the Cyg_Interrupt API.
    static Cyg_SpinLock interrupt_disable_spinlock CYGBLD_ANNOTATE_VARIABLE_INTR;
    static Cyg_SpinLock interrupt_disable_spinlock CYGBLD_ANNOTATE_VARIABLE_INTR;
    // Saved interrupt state. When each CPU first disables interrupts
    // Saved interrupt state. When each CPU first disables interrupts
    // the original state of the interrupts are saved here to be
    // the original state of the interrupts are saved here to be
    // restored later.
    // restored later.
    static CYG_INTERRUPT_STATE interrupt_disable_state[CYGNUM_KERNEL_CPU_MAX]
    static CYG_INTERRUPT_STATE interrupt_disable_state[CYGNUM_KERNEL_CPU_MAX]
                                                       CYGBLD_ANNOTATE_VARIABLE_INTR;
                                                       CYGBLD_ANNOTATE_VARIABLE_INTR;
public:
public:
    Cyg_Interrupt                       // Initialize interrupt
    Cyg_Interrupt                       // Initialize interrupt
    (
    (
        cyg_vector      vector,         // Vector to attach to
        cyg_vector      vector,         // Vector to attach to
        cyg_priority    priority,       // Queue priority
        cyg_priority    priority,       // Queue priority
        CYG_ADDRWORD    data,           // Data pointer
        CYG_ADDRWORD    data,           // Data pointer
        cyg_ISR         *isr,           // Interrupt Service Routine
        cyg_ISR         *isr,           // Interrupt Service Routine
        cyg_DSR         *dsr            // Deferred Service Routine
        cyg_DSR         *dsr            // Deferred Service Routine
        );
        );
    ~Cyg_Interrupt();
    ~Cyg_Interrupt();
    // ISR return values
    // ISR return values
    enum {
    enum {
        HANDLED  = 1,                   // Interrupt was handled
        HANDLED  = 1,                   // Interrupt was handled
        CALL_DSR = 2                    // Schedule DSR
        CALL_DSR = 2                    // Schedule DSR
    };
    };
    // Interrupt management
    // Interrupt management
    void        attach();               // Attach to vector
    void        attach();               // Attach to vector
    void        detach();               // Detach from vector
    void        detach();               // Detach from vector
    // Static Interrupt management functions
    // Static Interrupt management functions
    // Get the current service routine
    // Get the current service routine
    static void get_vsr(cyg_vector vector, cyg_VSR **vsr);
    static void get_vsr(cyg_vector vector, cyg_VSR **vsr);
    // Install a vector service routine
    // Install a vector service routine
    static void set_vsr(
    static void set_vsr(
        cyg_vector vector,              // hardware vector to replace
        cyg_vector vector,              // hardware vector to replace
        cyg_VSR *vsr,                   // my new service routine
        cyg_VSR *vsr,                   // my new service routine
        cyg_VSR **old = NULL            // pointer to old vsr, if required
        cyg_VSR **old = NULL            // pointer to old vsr, if required
        );
        );
    // Static interrupt masking functions
    // Static interrupt masking functions
    // Disable interrupts at the CPU
    // Disable interrupts at the CPU
    static void disable_interrupts();
    static void disable_interrupts();
    // Re-enable CPU interrupts
    // Re-enable CPU interrupts
    static void enable_interrupts();
    static void enable_interrupts();
    // Are interrupts enabled at the CPU?
    // Are interrupts enabled at the CPU?
    static inline cyg_bool interrupts_enabled()
    static inline cyg_bool interrupts_enabled()
    {
    {
        return (0 == disable_counter[CYG_KERNEL_CPU_THIS()]);
        return (0 == disable_counter[CYG_KERNEL_CPU_THIS()]);
    }
    }
    // Get the vector for the following calls
    // Get the vector for the following calls
    inline cyg_vector get_vector()
    inline cyg_vector get_vector()
    {
    {
        return vector;
        return vector;
    }
    }
    // Static PIC control functions
    // Static PIC control functions
    // Mask a specific interrupt in a PIC
    // Mask a specific interrupt in a PIC
    static void mask_interrupt(cyg_vector vector);
    static void mask_interrupt(cyg_vector vector);
    // The same but not interrupt safe
    // The same but not interrupt safe
    static void mask_interrupt_intunsafe(cyg_vector vector);
    static void mask_interrupt_intunsafe(cyg_vector vector);
    // Clear PIC mask
    // Clear PIC mask
    static void unmask_interrupt(cyg_vector vector);
    static void unmask_interrupt(cyg_vector vector);
    // The same but not interrupt safe
    // The same but not interrupt safe
    static void unmask_interrupt_intunsafe(cyg_vector vector);
    static void unmask_interrupt_intunsafe(cyg_vector vector);
    // Acknowledge interrupt at PIC
    // Acknowledge interrupt at PIC
    static void acknowledge_interrupt(cyg_vector vector);
    static void acknowledge_interrupt(cyg_vector vector);
    // Change interrupt detection at PIC
    // Change interrupt detection at PIC
    static void configure_interrupt(
    static void configure_interrupt(
        cyg_vector vector,              // vector to control
        cyg_vector vector,              // vector to control
        cyg_bool level,                 // level or edge triggered
        cyg_bool level,                 // level or edge triggered
        cyg_bool up                     // hi/lo level, rising/falling edge
        cyg_bool up                     // hi/lo level, rising/falling edge
        );
        );
#ifdef CYGPKG_KERNEL_SMP_SUPPORT
#ifdef CYGPKG_KERNEL_SMP_SUPPORT
    // SMP support for associating an interrupt with a specific CPU.
    // SMP support for associating an interrupt with a specific CPU.
    static void set_cpu( cyg_vector, HAL_SMP_CPU_TYPE cpu );
    static void set_cpu( cyg_vector, HAL_SMP_CPU_TYPE cpu );
    static HAL_SMP_CPU_TYPE get_cpu( cyg_vector );
    static HAL_SMP_CPU_TYPE get_cpu( cyg_vector );
#endif
#endif
};
};
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Check for pending DSRs
// Check for pending DSRs
inline cyg_bool Cyg_Interrupt::DSRs_pending()
inline cyg_bool Cyg_Interrupt::DSRs_pending()
{
{
    HAL_SMP_CPU_TYPE cpu = CYG_KERNEL_CPU_THIS();
    HAL_SMP_CPU_TYPE cpu = CYG_KERNEL_CPU_THIS();
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
    return dsr_table_head[cpu] != dsr_table_tail[cpu];
    return dsr_table_head[cpu] != dsr_table_tail[cpu];
#endif
#endif
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
    return dsr_list[cpu] != NULL;
    return dsr_list[cpu] != NULL;
#endif
#endif
};
};
#endif // CYGIMP_KERNEL_INTERRUPTS_DSRS
#endif // CYGIMP_KERNEL_INTERRUPTS_DSRS
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
#endif // ifndef CYGONCE_KERNEL_INTR_HXX
#endif // ifndef CYGONCE_KERNEL_INTR_HXX
// EOF intr.hxx
// EOF intr.hxx
 
 

powered by: WebSVN 2.1.0

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