Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
WindowsPlatformTLS.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "GenericPlatform/GenericPlatformTLS.h"
7#include "Windows/WindowsSystemIncludes.h"
8
9
10/**
11 * Windows implementation of the TLS OS functions.
12 */
14 : public FGenericPlatformTLS
15{
16 /**
17 * Returns the currently executing thread's identifier.
18 *
19 * @return The thread identifier.
20 */
21 static FORCEINLINE uint32 GetCurrentThreadId(void)
22 {
24 }
25
26 /**
27 * Allocates a thread local store slot.
28 *
29 * @return The index of the allocated slot.
30 */
31 static FORCEINLINE uint32 AllocTlsSlot(void)
32 {
34 }
35
36 /**
37 * Sets a value in the specified TLS slot.
38 *
39 * @param SlotIndex the TLS index to store it in.
40 * @param Value the value to store in the slot.
41 */
42 static FORCEINLINE void SetTlsValue(uint32 SlotIndex,void* Value)
43 {
44 Windows::TlsSetValue(SlotIndex,Value);
45 }
46
47 /**
48 * Reads the value stored at the specified TLS slot.
49 *
50 * @param SlotIndex The index of the slot to read.
51 * @return The value stored in the slot.
52 */
53 static FORCEINLINE void* GetTlsValue(uint32 SlotIndex)
54 {
55 return Windows::TlsGetValue(SlotIndex);
56 }
57
58 /**
59 * Frees a previously allocated TLS slot
60 *
61 * @param SlotIndex the TLS index to store it in
62 */
63 static FORCEINLINE void FreeTlsSlot(uint32 SlotIndex)
64 {
65 Windows::TlsFree(SlotIndex);
66 }
67};
68
69
#define FORCEINLINE
Definition Platform.h:644
FWindowsPlatformTLS FPlatformTLS
MINIMAL_WINDOWS_API BOOL WINAPI TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue)
MINIMAL_WINDOWS_API DWORD WINAPI GetCurrentThreadId()
MINIMAL_WINDOWS_API LPVOID WINAPI TlsGetValue(DWORD dwTlsIndex)
MINIMAL_WINDOWS_API BOOL WINAPI TlsFree(DWORD dwTlsIndex)
MINIMAL_WINDOWS_API DWORD WINAPI TlsAlloc()
static FORCEINLINE void * GetTlsValue(uint32 SlotIndex)
static FORCEINLINE uint32 GetCurrentThreadId(void)
static FORCEINLINE void FreeTlsSlot(uint32 SlotIndex)
static FORCEINLINE void SetTlsValue(uint32 SlotIndex, void *Value)
static FORCEINLINE uint32 AllocTlsSlot(void)