Panic.h 552 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. namespace Kernel {
  8. [[noreturn]] void __panic(const char* file, unsigned int line, const char* function);
  9. #define PANIC(...) \
  10. do { \
  11. critical_dmesgln("KERNEL PANIC! :^("); \
  12. critical_dmesgln(__VA_ARGS__); \
  13. __panic(__FILE__, __LINE__, __PRETTY_FUNCTION__); \
  14. } while (0)
  15. }