#ifndef PARTITION_ALLOC_THREAD_ISOLATION_THREAD_ISOLATION_H_
#define PARTITION_ALLOC_THREAD_ISOLATION_THREAD_ISOLATION_H_
#include "partition_alloc/buildflags.h"
#if PA_BUILDFLAG(ENABLE_THREAD_ISOLATION)
#include <cstddef>
#include <cstdint>
#include "partition_alloc/buildflags.h"
#include "partition_alloc/partition_alloc_base/component_export.h"
#if PA_BUILDFLAG(ENABLE_PKEYS)
#include "partition_alloc/thread_isolation/pkey.h"
#endif
#if !PA_BUILDFLAG(HAS_64_BIT_POINTERS)
#error "thread isolation support requires 64 bit pointers"
#endif
namespace partition_alloc {
struct ThreadIsolationOption { … };
}
namespace partition_alloc::internal {
#if PA_BUILDFLAG(DCHECKS_ARE_ON)
struct PA_THREAD_ISOLATED_ALIGN ThreadIsolationSettings { … };
#if PA_BUILDFLAG(ENABLE_PKEYS)
LiftThreadIsolationScope;
#endif
#endif
void WriteProtectThreadIsolatedGlobals(ThreadIsolationOption thread_isolation);
void UnprotectThreadIsolatedGlobals();
[[nodiscard]] int MprotectWithThreadIsolation(
void* addr,
size_t len,
int prot,
ThreadIsolationOption thread_isolation);
}
#endif
#endif