forked from Imagelibrary/rtems
Add prototypes, eliminate nested externs.
This commit is contained in:
@@ -40,6 +40,11 @@
|
|||||||
#define SA_RESTART 0
|
#define SA_RESTART 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern void _Thread_Dispatch(void);
|
||||||
|
extern uint32_t _Thread_Dispatch_disable_level;
|
||||||
|
extern bool _Context_Switch_necessary;
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
jmp_buf regs;
|
jmp_buf regs;
|
||||||
int isr_level;
|
int isr_level;
|
||||||
@@ -57,7 +62,7 @@ static Context_Control_overlay _CPU_Context_Default_with_ISRs_disabled;
|
|||||||
* Sync IO support, an entry for each fd that can be set
|
* Sync IO support, an entry for each fd that can be set
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void _CPU_Sync_io_Init();
|
void _CPU_Sync_io_Init(void);
|
||||||
|
|
||||||
static rtems_sync_io_handler _CPU_Sync_io_handlers[FD_SETSIZE];
|
static rtems_sync_io_handler _CPU_Sync_io_handlers[FD_SETSIZE];
|
||||||
static int sync_io_nfds;
|
static int sync_io_nfds;
|
||||||
@@ -184,7 +189,7 @@ void _CPU_Signal_initialize( void )
|
|||||||
* _CPU_Context_From_CPU_Init
|
* _CPU_Context_From_CPU_Init
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void _CPU_Context_From_CPU_Init()
|
void _CPU_Context_From_CPU_Init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
#if defined(__hppa__) && defined(RTEMS_UNIXLIB_SETJMP)
|
#if defined(__hppa__) && defined(RTEMS_UNIXLIB_SETJMP)
|
||||||
@@ -236,7 +241,7 @@ void _CPU_Context_From_CPU_Init()
|
|||||||
* _CPU_Sync_io_Init
|
* _CPU_Sync_io_Init
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void _CPU_Sync_io_Init()
|
void _CPU_Sync_io_Init(void)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@@ -392,7 +397,6 @@ void _CPU_Install_interrupt_stack( void )
|
|||||||
void *_CPU_Thread_Idle_body( uint32_t ignored )
|
void *_CPU_Thread_Idle_body( uint32_t ignored )
|
||||||
{
|
{
|
||||||
#if CPU_SYNC_IO
|
#if CPU_SYNC_IO
|
||||||
extern void _Thread_Dispatch(void);
|
|
||||||
int fd;
|
int fd;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -453,7 +457,7 @@ void *_CPU_Thread_Idle_body( uint32_t ignored )
|
|||||||
typedef struct AuxFrame_ {
|
typedef struct AuxFrame_ {
|
||||||
/* stack builds down from here */
|
/* stack builds down from here */
|
||||||
uint32_t ebx, esi, edi;
|
uint32_t ebx, esi, edi;
|
||||||
void (*eip)();
|
void (*eip)(void);
|
||||||
jmp_buf *pjb;
|
jmp_buf *pjb;
|
||||||
uint32_t old_esp;
|
uint32_t old_esp;
|
||||||
} AuxFrame /* __attribute__((may_alias)) ICE when not commented out*/;
|
} AuxFrame /* __attribute__((may_alias)) ICE when not commented out*/;
|
||||||
@@ -461,10 +465,10 @@ typedef struct AuxFrame_ {
|
|||||||
/* MUST make sure this is called in a new frame so it
|
/* MUST make sure this is called in a new frame so it
|
||||||
* uses the new stack
|
* uses the new stack
|
||||||
*/
|
*/
|
||||||
void trampo(void (*pc)(), jmp_buf *pjb)
|
void trampo(void (*pc)(void), jmp_buf *pjb)
|
||||||
__attribute__((noinline));
|
__attribute__((noinline));
|
||||||
|
|
||||||
void trampo(void (*pc)(), jmp_buf *pjb)
|
void trampo(void (*pc)(void), jmp_buf *pjb)
|
||||||
{
|
{
|
||||||
if ( setjmp( *pjb ) )
|
if ( setjmp( *pjb ) )
|
||||||
pc();
|
pc();
|
||||||
@@ -611,7 +615,7 @@ void _CPU_Context_Initialize(
|
|||||||
stack_ptr->ebx = 0xFEEDFEED;
|
stack_ptr->ebx = 0xFEEDFEED;
|
||||||
stack_ptr->esi = 0xDEADDEAD;
|
stack_ptr->esi = 0xDEADDEAD;
|
||||||
stack_ptr->edi = 0xDEAFDEAF;
|
stack_ptr->edi = 0xDEAFDEAF;
|
||||||
stack_ptr->eip = (void (*)())jmp_addr;
|
stack_ptr->eip = (void (*)(void))jmp_addr;
|
||||||
stack_ptr->pjb = &((Context_Control_overlay *)_the_context)->regs;
|
stack_ptr->pjb = &((Context_Control_overlay *)_the_context)->regs;
|
||||||
|
|
||||||
cpy_jmpbuf(stack_ptr);
|
cpy_jmpbuf(stack_ptr);
|
||||||
@@ -782,10 +786,6 @@ void _CPU_ISR_Enable(
|
|||||||
|
|
||||||
void _CPU_ISR_Handler(int vector)
|
void _CPU_ISR_Handler(int vector)
|
||||||
{
|
{
|
||||||
extern void _Thread_Dispatch(void);
|
|
||||||
extern uint32_t _Thread_Dispatch_disable_level;
|
|
||||||
extern bool _Context_Switch_necessary;
|
|
||||||
|
|
||||||
if (_ISR_Nest_level++ == 0) {
|
if (_ISR_Nest_level++ == 0) {
|
||||||
/* switch to interrupt stack */
|
/* switch to interrupt stack */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user