Skip to content

Commit

Permalink
chore(kernel: interrupts): force CLI/STI to be inline
Browse files Browse the repository at this point in the history
  • Loading branch information
d4ilyrun committed May 22, 2024
1 parent 8d12fe9 commit 0382a26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/kernel/arch/i686/interrupts.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,21 @@ void idt_log(void);
#define INLINED_INTERRUPTS_DISABLE_ENABLE

/** @brief Disable CPU interrupts */
static inline void interrupts_disable(void)
static ALWAYS_INLINE void interrupts_disable(void)
{
ASM("cli");
}

/** @brief Enable CPU interrupts */
static inline void interrupts_enable(void)
static ALWAYS_INLINE void interrupts_enable(void)
{
ASM("sti");
}

/* @brief Disable CPU interrupts
* @return Whether the interrupts where previously enabled
*/
static inline bool interrupts_test_and_disable(void)
static ALWAYS_INLINE bool interrupts_test_and_disable(void)
{
u32 eflags;
ASM("pushf; cli; popl %0" : "=r"(eflags)::"memory");
Expand Down
2 changes: 1 addition & 1 deletion include/kernel/spinlock.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

/**
* @ingroup kernel
* @addtogroup kernel
*
* @{
*/
Expand Down

0 comments on commit 0382a26

Please sign in to comment.