Renamed arch_int_is_interrupts_enabled() to arch_int_are_interrupts_enabled().
Replaced definitions for enable_interrupts() and are_interrupts_enabled() with static inlines. Made int.h C++ safe. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5190 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -21,7 +21,7 @@ int arch_int_disable_interrupts(void);
|
|||||||
void arch_int_restore_interrupts(int oldstate);
|
void arch_int_restore_interrupts(int oldstate);
|
||||||
void arch_int_enable_io_interrupt(int irq);
|
void arch_int_enable_io_interrupt(int irq);
|
||||||
void arch_int_disable_io_interrupt(int irq);
|
void arch_int_disable_io_interrupt(int irq);
|
||||||
bool arch_int_is_interrupts_enabled(void);
|
bool arch_int_are_interrupts_enabled(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,16 +14,34 @@ struct kernel_args;
|
|||||||
/* adds the handler but don't change whether or not the interrupt is currently enabled */
|
/* adds the handler but don't change whether or not the interrupt is currently enabled */
|
||||||
#define B_NO_ENABLE_COUNTER 1
|
#define B_NO_ENABLE_COUNTER 1
|
||||||
|
|
||||||
|
/* during kernel startup, interrupts are disabled */
|
||||||
|
extern bool kernel_startup;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
int int_init(struct kernel_args *ka);
|
int int_init(struct kernel_args *ka);
|
||||||
int int_init2(struct kernel_args *ka);
|
int int_init2(struct kernel_args *ka);
|
||||||
int int_io_interrupt_handler(int vector);
|
int int_io_interrupt_handler(int vector);
|
||||||
long install_interrupt_handler(long, interrupt_handler, void *);
|
long install_interrupt_handler(long, interrupt_handler, void *);
|
||||||
long remove_interrupt_handler (long, interrupt_handler, void *);
|
long remove_interrupt_handler (long, interrupt_handler, void *);
|
||||||
|
|
||||||
#define enable_interrupts arch_int_enable_interrupts
|
static inline void
|
||||||
#define are_interrupts_enabled arch_int_is_interrupts_enabled
|
enable_interrupts(void)
|
||||||
|
{
|
||||||
|
arch_int_enable_interrupts();
|
||||||
|
}
|
||||||
|
|
||||||
/* during kernel startup, interrupts are disabled */
|
static inline bool
|
||||||
extern bool kernel_startup;
|
are_interrupts_enabled(void)
|
||||||
|
{
|
||||||
|
return arch_int_are_interrupts_enabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _KERNEL_INT_H */
|
#endif /* _KERNEL_INT_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user