haiku/headers/private/kernel/int.h
Axel Dörfler 229ad83bf8 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
2003-10-28 17:55:20 +00:00

48 lines
969 B
C
Executable File

/*
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef _KERNEL_INT_H
#define _KERNEL_INT_H
#include <KernelExport.h>
#include <arch/int.h>
struct kernel_args;
/* adds the handler but don't change whether or not the interrupt is currently enabled */
#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_init2(struct kernel_args *ka);
int int_io_interrupt_handler(int vector);
long install_interrupt_handler(long, interrupt_handler, void *);
long remove_interrupt_handler (long, interrupt_handler, void *);
static inline void
enable_interrupts(void)
{
arch_int_enable_interrupts();
}
static inline bool
are_interrupts_enabled(void)
{
return arch_int_are_interrupts_enabled();
}
#ifdef __cplusplus
}
#endif
#endif /* _KERNEL_INT_H */