mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)
Use this instead of uintptr_t throughout the codebase. This makes it possible to pass a FlatPtr to something that has u32 and u64 overloads.
This commit is contained in:
parent
b98d8ad5b0
commit
b1058b33fb
36 changed files with 164 additions and 161 deletions
|
@ -34,13 +34,13 @@ namespace Kernel {
|
|||
struct [[gnu::packed]] MallocPerformanceEvent
|
||||
{
|
||||
size_t size;
|
||||
uintptr_t ptr;
|
||||
FlatPtr ptr;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] FreePerformanceEvent
|
||||
{
|
||||
size_t size;
|
||||
uintptr_t ptr;
|
||||
FlatPtr ptr;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] PerformanceEvent
|
||||
|
@ -52,14 +52,14 @@ struct [[gnu::packed]] PerformanceEvent
|
|||
MallocPerformanceEvent malloc;
|
||||
FreePerformanceEvent free;
|
||||
} data;
|
||||
uintptr_t stack[32];
|
||||
FlatPtr stack[32];
|
||||
};
|
||||
|
||||
class PerformanceEventBuffer {
|
||||
public:
|
||||
PerformanceEventBuffer();
|
||||
|
||||
KResult append(int type, uintptr_t arg1, uintptr_t arg2);
|
||||
KResult append(int type, FlatPtr arg1, FlatPtr arg2);
|
||||
|
||||
size_t capacity() const { return m_buffer.size() / sizeof(PerformanceEvent); }
|
||||
size_t count() const { return m_count; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue