This repository has been archived on 2024-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
2023-12-03 17:08:00 +08:00
|
|
|
#ifndef UTILS_H
|
|
|
|
#define UTILS_H 1
|
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
|
|
|
|
#define DISALIGNED __attribute__((packed))
|
|
|
|
|
2024-03-10 01:27:42 +08:00
|
|
|
#define into_bytes(addr) ((u8 *)(addr))
|
|
|
|
#define bytes_into(bytes, type) ((type *)(bytes))
|
|
|
|
|
|
|
|
void pointer_to_string(u64 addr, char * dest);
|
|
|
|
|
2023-12-03 17:08:00 +08:00
|
|
|
#endif
|