#include <sys/cdefs.h>
#include <sys/sysctl.h>
Go to the source code of this file.
|
| #define | ASSERT(_x) |
| |
| #define | NOT_IMPLEMENTED() |
| |
| #define | PANIC Panic |
| |
| #define | static_assert _Static_assert |
| |
| #define | Alert(_module, _format, ...) kprintf(#_module ": " _format, ##__VA_ARGS__) |
| |
| #define | Warning(_module, _format, ...) kprintf(#_module ": " _format, ##__VA_ARGS__) |
| |
| #define | Log(_module, _format, ...) |
| |
| #define | DLOG(_module, _format, ...) |
| |
| #define | VLOG(_module, _format, ...) |
| |
◆ Alert
| #define Alert |
( |
|
_module, |
|
|
|
_format, |
|
|
|
... |
|
) |
| kprintf(#_module ": " _format, ##__VA_ARGS__) |
◆ ASSERT
Value: if (!(_x)) { \
Debug_Assert("ASSERT("#_x"): %s %s:%d\n", \
__FUNCTION__, __FILE__, __LINE__); \
}
Definition at line 8 of file kassert.h.
◆ DLOG
| #define DLOG |
( |
|
_module, |
|
|
|
_format, |
|
|
|
... |
|
) |
| |
Value:
kprintf(#_module ": " _format, ##__VA_ARGS__); \
}
#define SYSCTL_GETINT(_PATH)
Definition at line 37 of file kassert.h.
◆ Log
| #define Log |
( |
|
_module, |
|
|
|
_format, |
|
|
|
... |
|
) |
| |
Value:
kprintf(#_module ": " _format, ##__VA_ARGS__); \
}
Definition at line 32 of file kassert.h.
◆ NOT_IMPLEMENTED
| #define NOT_IMPLEMENTED |
( |
| ) |
|
Value: if (1) { \
Debug_Assert("NOT_IMPLEMENTED(): %s %s:%d\n", \
__FUNCTION__, __FILE__, __LINE__); \
}
Definition at line 13 of file kassert.h.
◆ PANIC
◆ static_assert
| #define static_assert _Static_assert |
◆ VLOG
| #define VLOG |
( |
|
_module, |
|
|
|
_format, |
|
|
|
... |
|
) |
| |
Value:
kprintf(#_module ": " _format, ##__VA_ARGS__); \
}
Definition at line 42 of file kassert.h.
◆ Warning
| #define Warning |
( |
|
_module, |
|
|
|
_format, |
|
|
|
... |
|
) |
| kprintf(#_module ": " _format, ##__VA_ARGS__) |
◆ Debug_Assert()
| NO_RETURN void Debug_Assert |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 222 of file printf.c.
223{
225
229
230#if 0
231 kprintf(
"PC %lx FP %lx\n", __builtin_return_address(0), __builtin_frame_address(0));
232 kprintf(
"PC %lx FP %lx\n", __builtin_return_address(1), __builtin_frame_address(1));
233 kprintf(
"PC %lx FP %lx\n", __builtin_return_address(2), __builtin_frame_address(2));
234 kprintf(
"PC %lx FP %lx\n", __builtin_return_address(3), __builtin_frame_address(3));
235 kprintf(
"PC %lx FP %lx\n", __builtin_return_address(4), __builtin_frame_address(4));
236 kprintf(
"PC %lx FP %lx\n", __builtin_return_address(5), __builtin_frame_address(5));
237#endif
238
240}
static int kvprintf(char const *fmt, void(*func)(int, void *), void *handle, va_list ap)
#define va_start(ap, last)
__builtin_va_list va_list
int kprintf(const char *fmt,...)
void consoleputc(int c, void *handle)
void Panic(const char *str)
◆ kprintf()
| int kprintf |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 210 of file printf.c.
211{
212 int ret;
214
218
219 return ret;
220}
◆ Panic()
Definition at line 164 of file vgacons.c.
165{
167 __asm__("int3");
168 while (1)
169 {
170 __asm__("hlt");
171 }
172}
void VGA_Puts(const char *str)