File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727#include < string>
2828
2929
30- extern void __arch_poweroff ();
31- extern void __arch_reboot ();
30+ [[noreturn]] extern void __arch_poweroff ();
31+ [[noreturn]] extern void __arch_reboot ();
3232extern void __arch_enable_legacy_irq (uint8_t );
3333extern void __arch_disable_legacy_irq (uint8_t );
3434extern void __arch_system_deactivate ();
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ namespace os {
8686 //
8787
8888 /* * Trigger unrecoverable error and output diagnostics **/
89- __attribute__ (( noreturn))
89+ [[ noreturn]]
9090 void panic (const char * why) noexcept ;
9191
9292 /* * Default behavior after panic **/
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ extern kernel::ctor_t __plugin_ctors_end;
118118 * Print EOT character to stderr, to signal outside that PANIC output completed
119119 * If the handler returns, go to (permanent) sleep
120120**/
121- void os::panic (const char * why) noexcept
121+ [[noreturn]] void os::panic (const char * why) noexcept
122122{
123123 cpu_enable_panicking ();
124124 if (kernel::panics () > 4 ) double_fault (why);
Original file line number Diff line number Diff line change @@ -393,8 +393,7 @@ namespace x86 {
393393 }
394394 }
395395
396- __attribute__ ((noreturn))
397- void ACPI::shutdown ()
396+ [[noreturn]] void ACPI::shutdown ()
398397 {
399398 asm (" cli" );
400399
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ namespace x86 {
102102 }
103103
104104 static void reboot ();
105- static void shutdown ();
105+ [[noreturn]] static void shutdown ();
106106
107107 private:
108108 void discover ();
Original file line number Diff line number Diff line change @@ -147,12 +147,11 @@ void __arch_disable_legacy_irq(uint8_t irq)
147147 x86::APIC::disable_irq (irq);
148148}
149149
150- void __arch_poweroff ()
150+ [[noreturn]] void __arch_poweroff ()
151151{
152152 x86::ACPI::shutdown ();
153- __builtin_unreachable ();
154153}
155- void __arch_reboot ()
154+ [[noreturn]] void __arch_reboot ()
156155{
157156 x86::ACPI::reboot ();
158157 __builtin_unreachable ();
You can’t perform that action at this time.
0 commit comments