refactor(profile): profiles are now stored in profile/ subdirectory

This commit is contained in:
phaneron 2024-09-08 21:04:31 -04:00
parent 1e1f435c5c
commit c2b96d98b6
100 changed files with 58650 additions and 10 deletions

View file

@ -0,0 +1,39 @@
#ifndef COMMON_DATA_RECYCLER_H
#define COMMON_DATA_RECYCLER_H
#include "system/types.h"
DECLARE_STRUCT(CDataRecycler);
DECLARE_STRUCT(CDataRecycler__vtable);
DECLARE_STRUCT(CDataRecycler__NodeBlock);
DECLARE_STRUCT(CDataRecycler__Node);
struct CDataRecycler__vtable {
void* v_fn_00;
void* v_fn_01;
void* v_fn_02;
void* v_fn_03;
void* v_fn_04;
};
struct CDataRecycler__Node {
CDataRecycler__Node* m_next;
void* m_data;
uint32_t m_bytes;
};
struct CDataRecycler__NodeBlock {
CDataRecycler__NodeBlock* m_next;
CDataRecycler__Node m_nodes[1];
};
struct CDataRecycler {
CDataRecycler__vtable* v_vtable;
int32_t m_nodesRecyclable;
uint32_t m_nodesPerBlock;
CDataRecycler__NodeBlock* m_nodeBlockList;
CDataRecycler__Node* m_nodeFullList;
CDataRecycler__Node* m_nodeEmptyList;
};
#endif

View file

@ -0,0 +1,13 @@
#ifndef COMMON_HANDLE_H
#define COMMON_HANDLE_H
#include "system/types.h"
#if !defined(DECLARE_HANDLE)
#define DECLARE_HANDLE(name) \
typedef struct name##__ { \
int32_t unused; \
}* name
#endif
#endif

View file

@ -0,0 +1,43 @@
#ifndef COMMON_INSTANCE_H
#define COMMON_INSTANCE_H
#include "system/types.h"
#include "storm/list.h"
#include "storm/thread.h"
// TSList<T>
// TSLinkedNode<T>
// TInstanceId<T>
// TSingletonInstanceId<T>
#define COMMON_INSTANCE_ID(T) \
STORM_TS_LIST(T) \
typedef struct TInstanceId_##T TInstanceId_##T; \
typedef struct TSingletonInstanceId_##T TSingletonInstanceId_##T; \
struct TInstanceId_##T { \
TSLinkedNode_##T b_base; \
uint32_t m_id; \
}; \
struct TSingletonInstanceId_##T { \
TInstanceId_##T b_base; \
};
#define COMMON_INSTANCE_ID_TABLE(T) \
STORM_TS_LIST(T) \
typedef struct TInstanceIdTable_##T TInstanceIdTable_##T; \
struct TInstanceIdTable_##T { \
SCritSect m_idCritSect; \
uint32_t m_id; \
int32_t m_idWrapped; \
CSRWLock m_idLock[8]; \
TSList_##T m_idList[8]; \
};
// template <class T>
// class TExtraInstanceRecyclable
typedef struct TExtraInstanceRecyclable TExtraInstanceRecyclable;
struct TExtraInstanceRecyclable {
uint32_t m_recycleBytes;
};
#endif

View file

@ -0,0 +1,36 @@
#ifndef COMMON_STATUS_H
#define COMMON_STATUS_H
#include "storm/list.h"
DECLARE_ENUM(STATUS_TYPE);
DECLARE_STRUCT(CStatus);
DECLARE_STRUCT(CStatus__STATUSENTRY);
enum STATUS_TYPE {
STATUS_INFO = 0x0,
STATUS_WARNING = 0x1,
STATUS_ERROR = 0x2,
STATUS_FATAL = 0x3,
STATUS_NUMTYPES = 0x4
};
STORM_TS_LIST(CStatus__STATUSENTRY);
struct CStatus__STATUSENTRY {
char* text;
STATUS_TYPE severity;
TSLink_CStatus__STATUSENTRY link;
};
struct CStatus {
TSExplicitList_CStatus__STATUSENTRY statusList;
};
// class CWOWClientStatus : public CStatus {
// public:
// HSLOG m_logFile = nullptr;
// };
#endif