Thread: Re-add <new> include for std::hardware_destructive_interference_size

Somehow it would still build fine, but would crash when compiled with GCC 12.2
on Debian 12.

Also re-add wrongly removed Mutex include from `thread_safe.h`, where it's used
in macros.

Add IWYU pragma comments to prevent it from mistakenly flagging those as unused.
This commit is contained in:
Rémi Verschelde
2025-01-01 21:49:16 +01:00
parent 2582793d40
commit f2d4dac92e
3 changed files with 18 additions and 7 deletions

View File

@@ -29,13 +29,13 @@
/**************************************************************************/
#include "platform_config.h"
#ifndef PLATFORM_THREAD_OVERRIDE // See details in thread.h
#ifndef PLATFORM_THREAD_OVERRIDE // See details in thread.h.
#include "thread.h"
#ifdef THREADS_ENABLED
#include "core/object/script_language.h"
#include "core/templates/safe_refcount.h"
SafeNumeric<uint64_t> Thread::id_counter(1); // The first value after .increment() is 2, hence by default the main thread ID should be 1.