[kernel] Specification interrupt nested level variable declaration type (#9568)

This commit is contained in:
Yuqiang Wang 2024-10-24 05:08:29 +08:00 committed by GitHub
parent 40124ca12b
commit b3d59050b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
36 changed files with 36 additions and 36 deletions

View File

@ -14,7 +14,7 @@
#include "interrupt.h" #include "interrupt.h"
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
rt_uint32_t rt_thread_switch_interrupt_flag; rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -15,7 +15,7 @@
#define MAX_HANDLERS (64) #define MAX_HANDLERS (64)
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc irq_desc[MAX_HANDLERS]; struct rt_irq_desc irq_desc[MAX_HANDLERS];

View File

@ -13,7 +13,7 @@
#include "interrupt.h" #include "interrupt.h"
#define MAX_HANDLERS (AIC_IRQS + PIN_IRQS) #define MAX_HANDLERS (AIC_IRQS + PIN_IRQS)
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc irq_desc[MAX_HANDLERS]; struct rt_irq_desc irq_desc[MAX_HANDLERS];

View File

@ -15,7 +15,7 @@
#define AIC_IRQS 32 #define AIC_IRQS 32
#define MAX_HANDLERS (AIC_IRQS + PIN_IRQS) #define MAX_HANDLERS (AIC_IRQS + PIN_IRQS)
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc irq_desc[MAX_HANDLERS]; struct rt_irq_desc irq_desc[MAX_HANDLERS];

View File

@ -27,7 +27,7 @@ typedef void (*spiflash_init_func)(uint8_t sf_read, uint8_t dummy);
static struct rt_mutex mutex_spiflash = {0}; static struct rt_mutex mutex_spiflash = {0};
static struct rt_mutex mutex_cache = {0}; static struct rt_mutex mutex_cache = {0};
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
extern uint32_t __heap_start, __heap_end; extern uint32_t __heap_start, __heap_end;
#ifdef RT_USING_CONSOLE #ifdef RT_USING_CONSOLE

View File

@ -15,7 +15,7 @@
#include "encoding.h" #include "encoding.h"
#include "mmio.h" #include "mmio.h"
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
extern rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; extern rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
extern rt_uint32_t rt_thread_switch_interrupt_flag; extern rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -15,7 +15,7 @@
#define MAX_HANDLERS 64 #define MAX_HANDLERS 64
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
struct rt_irq_desc irq_desc[MAX_HANDLERS]; struct rt_irq_desc irq_desc[MAX_HANDLERS];

View File

@ -21,7 +21,7 @@
#define INT_IRQ 0x00 #define INT_IRQ 0x00
#define INT_FIQ 0x01 #define INT_FIQ 0x01
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
rt_uint32_t rt_thread_switch_interrupt_flag; rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -21,7 +21,7 @@
#define INT_IRQ 0x00 #define INT_IRQ 0x00
#define INT_FIQ 0x01 #define INT_FIQ 0x01
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
rt_uint32_t rt_thread_switch_interrupt_flag; rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -20,7 +20,7 @@
#define MAX_HANDLERS IMX_INTERRUPT_COUNT #define MAX_HANDLERS IMX_INTERRUPT_COUNT
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];

View File

@ -16,7 +16,7 @@
#define MAX_HANDLERS 64 #define MAX_HANDLERS 64
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];

View File

@ -22,7 +22,7 @@
#ifdef RT_USING_SMP #ifdef RT_USING_SMP
#define rt_interrupt_nest rt_cpu_self()->irq_nest #define rt_interrupt_nest rt_cpu_self()->irq_nest
#else #else
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
#endif #endif
const unsigned int VECTOR_BASE = 0x00; const unsigned int VECTOR_BASE = 0x00;

View File

@ -17,7 +17,7 @@
#include "F28x_Project.h" #include "F28x_Project.h"
#ifndef RT_USING_SMP #ifndef RT_USING_SMP
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
#endif #endif
extern rt_uint32_t rt_thread_switch_interrupt_flag; extern rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -13,7 +13,7 @@
#define MAX_HANDLERS 32 #define MAX_HANDLERS 32
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
rt_uint32_t rt_thread_switch_interrupt_flag; rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -18,7 +18,7 @@
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc irq_desc[MAX_HANDLERS]; struct rt_irq_desc irq_desc[MAX_HANDLERS];
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
rt_uint32_t rt_thread_switch_interrupt_flag; rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -19,7 +19,7 @@
#define MAX_HANDLERS 128 #define MAX_HANDLERS 128
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];

View File

@ -22,7 +22,7 @@
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc irq_desc[MAX_HANDLERS]; struct rt_irq_desc irq_desc[MAX_HANDLERS];
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;

View File

@ -16,7 +16,7 @@
#define MAX_HANDLERS 32 #define MAX_HANDLERS 32
#define SVCMODE 0x13 #define SVCMODE 0x13
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc irq_desc[MAX_HANDLERS]; struct rt_irq_desc irq_desc[MAX_HANDLERS];

View File

@ -18,7 +18,7 @@
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc irq_desc[MAX_HANDLERS]; struct rt_irq_desc irq_desc[MAX_HANDLERS];
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;

View File

@ -16,7 +16,7 @@
#define MAX_HANDLERS NR_IRQS_PBA8 #define MAX_HANDLERS NR_IRQS_PBA8
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];

View File

@ -15,7 +15,7 @@
#define MAX_HANDLERS 32 #define MAX_HANDLERS 32
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];

View File

@ -15,7 +15,7 @@
#define MAX_HANDLERS 26 #define MAX_HANDLERS 26
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
rt_isr_handler_t isr_table[MAX_HANDLERS]; rt_isr_handler_t isr_table[MAX_HANDLERS];

View File

@ -15,7 +15,7 @@
#define MAX_HANDLERS 32 #define MAX_HANDLERS 32
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];

View File

@ -16,7 +16,7 @@
#define MAX_HANDLERS IRQ_ZynqMP_MAXNR #define MAX_HANDLERS IRQ_ZynqMP_MAXNR
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];

View File

@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* switch flag on interrupt and thread pointer to save switch record */ /* switch flag on interrupt and thread pointer to save switch record */
rt_uint32_t rt_interrupt_from_thread; rt_uint32_t rt_interrupt_from_thread;

View File

@ -13,7 +13,7 @@
#include <asm/processor.h> #include <asm/processor.h>
/* interrupt nest */ /* interrupt nest */
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
#define MAX_HANDLERS 32 #define MAX_HANDLERS 32

View File

@ -15,7 +15,7 @@
#include "riscv.h" #include "riscv.h"
#include "plic.h" #include "plic.h"
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
extern rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; extern rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
extern rt_uint32_t rt_thread_switch_interrupt_flag; extern rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -15,7 +15,7 @@
#include "riscv.h" #include "riscv.h"
#include "plic.h" #include "plic.h"
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
extern rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; extern rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
extern rt_uint32_t rt_thread_switch_interrupt_flag; extern rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -19,7 +19,7 @@
#define ENTER_INTERRUPT() ICU.SWINTR.BIT.SWINT = 1; #define ENTER_INTERRUPT() ICU.SWINTR.BIT.SWINT = 1;
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* switch flag on interrupt and thread pointer to save switch record */ /* switch flag on interrupt and thread pointer to save switch record */

View File

@ -16,7 +16,7 @@
#define MAX_HANDLERS 256 #define MAX_HANDLERS 256
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];
rt_uint32_t rt_interrupt_from_thread; rt_uint32_t rt_interrupt_from_thread;
rt_uint32_t rt_interrupt_to_thread; rt_uint32_t rt_interrupt_to_thread;

View File

@ -17,7 +17,7 @@
#define DBG_LVL DBG_INFO #define DBG_LVL DBG_INFO
#include <rtdbg.h> #include <rtdbg.h>
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
rt_uint32_t rt_interrupt_from_thread; rt_uint32_t rt_interrupt_from_thread;

View File

@ -14,7 +14,7 @@
#define MAX_HANDLERS 128 #define MAX_HANDLERS 128
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];
rt_uint32_t rt_interrupt_from_thread; rt_uint32_t rt_interrupt_from_thread;
rt_uint32_t rt_interrupt_to_thread; rt_uint32_t rt_interrupt_to_thread;

View File

@ -78,7 +78,7 @@ do{ \
}while(0) }while(0)
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
/* exception and interrupt handler table */ /* exception and interrupt handler table */
struct rt_irq_desc isr_table[MAX_HANDLERS]; struct rt_irq_desc isr_table[MAX_HANDLERS];
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;

View File

@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
/* switch flag on interrupt and thread pointer to save switch record */ /* switch flag on interrupt and thread pointer to save switch record */
rt_uint32_t rt_interrupt_from_thread; rt_uint32_t rt_interrupt_from_thread;

View File

@ -25,7 +25,7 @@
extern XIntc int_ctl; /* The instance of the Interrupt Controller */ extern XIntc int_ctl; /* The instance of the Interrupt Controller */
extern rt_uint32_t rt_interrupt_nest; extern rt_atomic_t rt_interrupt_nest;
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
rt_uint32_t rt_thread_switch_interrupt_flag; rt_uint32_t rt_thread_switch_interrupt_flag;

View File

@ -46,7 +46,7 @@ rt_uint32_t rt_thread_ready_priority_group;
rt_uint8_t rt_thread_ready_table[32]; rt_uint8_t rt_thread_ready_table[32];
#endif /* RT_THREAD_PRIORITY_MAX > 32 */ #endif /* RT_THREAD_PRIORITY_MAX > 32 */
extern volatile rt_uint8_t rt_interrupt_nest; extern volatile rt_atomic_t rt_interrupt_nest;
static rt_int16_t rt_scheduler_lock_nest; static rt_int16_t rt_scheduler_lock_nest;
rt_uint8_t rt_current_priority; rt_uint8_t rt_current_priority;