diff options
author | Linus Groh <mail@linusgroh.de> | 2020-12-30 22:44:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-31 21:51:00 +0100 |
commit | bbe787a0afd51307cdac2c023895c19df31519ca (patch) | |
tree | 44dc80cf50b22b461c27c1e9d99fa2c9ff00e22e /Kernel/Arch | |
parent | 2568a93b5dd29d2b06d613a4ece502ee696f189a (diff) | |
download | serenity-bbe787a0afd51307cdac2c023895c19df31519ca.zip |
Everywhere: Re-format with clang-format-11
Compared to version 10 this fixes a bunch of formatting issues, mostly
around structs/classes with attributes like [[gnu::packed]], and
incorrect insertion of spaces in parameter types ("T &"/"T &&").
I also removed a bunch of // clang-format off/on and FIXME comments that
are no longer relevant - on the other hand it tried to destroy a couple of
neatly formatted comments, so I had to add some as well.
Diffstat (limited to 'Kernel/Arch')
-rw-r--r-- | Kernel/Arch/i386/CPU.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Kernel/Arch/i386/CPU.h b/Kernel/Arch/i386/CPU.h index d9a36f5c32..41dc2748cb 100644 --- a/Kernel/Arch/i386/CPU.h +++ b/Kernel/Arch/i386/CPU.h @@ -51,14 +51,12 @@ inline u32 get_iopl_from_eflags(u32 eflags) return (eflags & iopl_mask) >> 12; } -struct [[gnu::packed]] DescriptorTablePointer -{ +struct [[gnu::packed]] DescriptorTablePointer { u16 limit; void* address; }; -struct [[gnu::packed]] TSS32 -{ +struct [[gnu::packed]] TSS32 { u16 backlink, __blh; u32 esp0; u16 ss0, __ss0h; @@ -78,8 +76,7 @@ struct [[gnu::packed]] TSS32 u16 trace, iomapbase; }; -union [[gnu::packed]] Descriptor -{ +union [[gnu::packed]] Descriptor { struct { u16 limit_lo; u16 base_lo; @@ -347,15 +344,15 @@ inline u32 read_fs_u32(u32 offset) u32 val; asm volatile( "movl %%fs:%a[off], %k[val]" - : [ val ] "=r"(val) - : [ off ] "ir"(offset)); + : [val] "=r"(val) + : [off] "ir"(offset)); return val; } inline void write_fs_u32(u32 offset, u32 val) { asm volatile( - "movl %k[val], %%fs:%a[off]" ::[off] "ir"(offset), [ val ] "ir"(val) + "movl %k[val], %%fs:%a[off]" ::[off] "ir"(offset), [val] "ir"(val) : "memory"); } @@ -475,8 +472,7 @@ private: VirtualAddress m_vaddr; }; -struct [[gnu::packed]] RegisterState -{ +struct [[gnu::packed]] RegisterState { u32 ss; u32 gs; u32 fs; @@ -539,7 +535,7 @@ static inline bool is_kernel_mode() u32 cs; asm volatile( "movl %%cs, %[cs] \n" - : [ cs ] "=g"(cs)); + : [cs] "=g"(cs)); return (cs & 3) == 0; } |