39 #define UNUSED __attribute__((unused)) 42 bool stringIsEqual(
const char *str,
const char *buf, uint32_t len);
46 void *
memcpy(
void *destination,
const void *source,
size_t num);
47 void *
memmove(
void *destination,
const void *source,
size_t num);
55 for (;;)
asm volatile(
"cli\nhlt");
58 #define _STRINGIZE_DETAIL(x) #x 59 #define _STRINGIZE(x) _STRINGIZE_DETAIL(x) 64 struct taskContext __context; \ 66 debugCaptureCpuContext(&__context); \ 67 debugAssertFailed(#ex, __FILE__, __FUNCTION__, _STRINGIZE(__LINE__), &__context); \ 71 #define SYSTEM_FAILURE(lines, ...) \ 74 struct taskContext __context; \ 75 uint32_t __args[] = {__VA_ARGS__}; \ 76 memset(&__context, 0xFF, sizeof(__context)); \ 77 debugCaptureCpuContext(&__context); \ 78 consoleSystemFailure((lines), sizeof(__args)/sizeof(__args[0]), __args, &__context); \ 82 #define NOTIMPLEMENTED() \ 85 struct taskContext __context; \ 86 debugCaptureCpuContext(&__context); \ 87 debugNotImplemented(__FILE__, __FUNCTION__, _STRINGIZE(__LINE__), &__context); \
void * memset(void *ptr, int value, size_t num)
Fills a memory region with some specific byte value.
uint32_t stringLength(const char *str)
Returns the length of a nullterminated string.
void debugCaptureCpuContext(struct taskContext *context)
void * memmove(void *destination, const void *source, size_t num)
Moves a block of memory from source to destination.
void * memcpy(void *destination, const void *source, size_t num)
Copies a block of memory from source to destination.
void debugNotImplemented(const char *file, const char *function, const char *line, struct taskContext *context)
Used internally to implement NOTIMPLEMENTED()
uint32_t stringParseOctal(const char *str, uint32_t len)
Converts an octal string to a integer number.
void debugAssertFailed(const char *assertion, const char *file, const char *function, const char *line, struct taskContext *context)
Used internally to implement assert()
bool stringIsEqual(const char *str, const char *buf, uint32_t len)
Checks if the string is equal to the memory region.