the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 47 lines 1.1 kB view raw
1#pragma once 2 3class ShutdownManager 4{ 5public: 6 typedef enum 7 { 8 eMainThread, 9 10 eLeaderboardThread, 11 eCommerceThread, 12 ePostProcessThread, 13 eRunUpdateThread, 14 eRenderChunkUpdateThread, 15 eServerThread, 16 eStorageManagerThreads, 17 eConnectionReadThreads, 18 eConnectionWriteThreads, 19 eEventQueueThreads, 20 21 eThreadIdCount 22 } EThreadId; 23 24 static void Initialise(); 25 static void StartShutdown(); 26 static void MainThreadHandleShutdown(); 27#ifdef __PS3__ 28 static void SysUtilCallback(uint64_t status, uint64_t param, void *userdata); 29#endif 30 31 static void HasStarted(EThreadId threadId); 32 static void HasStarted(EThreadId threadId, C4JThread::EventArray *eventArray); 33 static bool ShouldRun(EThreadId threadId); 34 static void HasFinished(EThreadId threadId); 35 36private: 37#ifdef __PS3__ 38 static bool s_threadShouldRun[eThreadIdCount]; 39 static int s_threadRunning[eThreadIdCount]; 40 static CRITICAL_SECTION s_threadRunningCS; 41 static C4JThread::EventArray *s_eventArray[eThreadIdCount]; 42 43 static void RequestThreadToStop(int i); 44 static void WaitForSignalledToComplete(); 45 static void StorageManagerCompleteFn(); 46#endif 47};