mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-22 08:09:29 +08:00
add: migrate source code of luahook
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "dobby/common.h"
|
||||
|
||||
namespace zz {
|
||||
|
||||
class OSThread {
|
||||
public:
|
||||
typedef int LocalStorageKey;
|
||||
|
||||
static int GetCurrentProcessId();
|
||||
|
||||
static int GetCurrentThreadId();
|
||||
|
||||
static LocalStorageKey CreateThreadLocalKey();
|
||||
|
||||
static void DeleteThreadLocalKey(LocalStorageKey key);
|
||||
|
||||
static void *GetThreadLocal(LocalStorageKey key);
|
||||
|
||||
static int GetThreadLocalInt(LocalStorageKey key);
|
||||
|
||||
static void SetThreadLocal(LocalStorageKey key, void *value);
|
||||
|
||||
static void SetThreadLocalInt(LocalStorageKey key, int value);
|
||||
|
||||
static bool HasThreadLocal(LocalStorageKey key);
|
||||
|
||||
static void *GetExistingThreadLocal(LocalStorageKey key);
|
||||
};
|
||||
|
||||
} // namespace zz
|
||||
Reference in New Issue
Block a user