arch/x86: Make sure compiler knows we're stopping in hlt()
Currently, static analyzers don't recognize that hlt() doesn't return, so they show errors like uninitialized variables assuming that it does return. This takes care of that problem. Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: Ia2325700b10fe1f89d749edfe5aee72b47d02f2e Reviewed-on: https://review.coreboot.org/c/coreboot/+/56978 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
d3b6d84e11
commit
96f26d15ee
|
@ -3,8 +3,9 @@
|
|||
#ifndef ARCH_HLT_H
|
||||
#define ARCH_HLT_H
|
||||
|
||||
static __always_inline void hlt(void)
|
||||
static __noreturn __always_inline void hlt(void)
|
||||
{
|
||||
while (1)
|
||||
asm("hlt");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue