mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:27:34 +00:00
Everywhere: Replace uses of __serenity__ with AK_OS_SERENITY
Now that we have OS macros for essentially every supported OS, let's try to use them everywhere.
This commit is contained in:
parent
896d4e8dc1
commit
828441852f
46 changed files with 118 additions and 113 deletions
|
@ -20,13 +20,13 @@
|
|||
#include <LibJS/SafeFunction.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#ifdef __serenity__
|
||||
#ifdef AK_OS_SERENITY
|
||||
# include <serenity.h>
|
||||
#endif
|
||||
|
||||
namespace JS {
|
||||
|
||||
#ifdef __serenity__
|
||||
#ifdef AK_OS_SERENITY
|
||||
static int gc_perf_string_id;
|
||||
#endif
|
||||
|
||||
|
@ -36,7 +36,7 @@ static __thread HashMap<FlatPtr*, size_t>* s_custom_ranges_for_conservative_scan
|
|||
Heap::Heap(VM& vm)
|
||||
: m_vm(vm)
|
||||
{
|
||||
#ifdef __serenity__
|
||||
#ifdef AK_OS_SERENITY
|
||||
auto gc_signpost_string = "Garbage collection"sv;
|
||||
gc_perf_string_id = perf_register_string(gc_signpost_string.characters_without_null_termination(), gc_signpost_string.length());
|
||||
#endif
|
||||
|
@ -91,7 +91,7 @@ void Heap::collect_garbage(CollectionType collection_type, bool print_report)
|
|||
VERIFY(!m_collecting_garbage);
|
||||
TemporaryChange change(m_collecting_garbage, true);
|
||||
|
||||
#ifdef __serenity__
|
||||
#ifdef AK_OS_SERENITY
|
||||
static size_t global_gc_counter = 0;
|
||||
perf_event(PERF_EVENT_SIGNPOST, gc_perf_string_id, global_gc_counter++);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue