Fix a shitloads of warnings on VS

Former-commit-id: fca61118f4e0530ed2eaaf9ff96de29806aa5aa8
This commit is contained in:
Lynix
2015-11-25 18:19:26 +01:00
parent c6d16c0128
commit bbe8a776e8
42 changed files with 406 additions and 437 deletions

View File

@@ -22,19 +22,19 @@ namespace Nz
TaskSchedulerImpl() = delete;
~TaskSchedulerImpl() = delete;
static bool Initialize(unsigned int workerCount);
static bool Initialize(std::size_t workerCount);
static bool IsInitialized();
static void Run(Functor** tasks, unsigned int count);
static void Run(Functor** tasks, std::size_t count);
static void Uninitialize();
static void WaitForTasks();
private:
static Functor* StealTask(unsigned int workerID);
static Functor* StealTask(std::size_t workerID);
static unsigned int __stdcall WorkerProc(void* userdata);
struct Worker
{
std::atomic_uint workCount;
std::atomic_size_t workCount;
std::queue<Functor*> queue;
CRITICAL_SECTION queueMutex;
HANDLE wakeEvent;
@@ -44,7 +44,7 @@ namespace Nz
static std::unique_ptr<HANDLE[]> s_doneEvents; // Doivent être contigus
static std::unique_ptr<Worker[]> s_workers;
static std::unique_ptr<HANDLE[]> s_workerThreads; // Doivent être contigus
static unsigned int s_workerCount;
static std::size_t s_workerCount;
};
}