Recommended

Multicore community

 

Articles

Intel.com

Microsoft.co.il

 

Community

Microsoft Forums

Intel's Forum

Intel's Multicore Community

 

Resources

http://msdn.com/concurrency

Intel Multicore

NVidia Multicore GPU

 

Downloads

.Net Parallel Extensions

Intel's TBB

WinModules   

 

Tools

AsyncOp Logger

Intel thread analysis

Intel VTune

 

Contact

Asaf Shelly

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ichilov

-->

 

 

 

 

 

 
2 / 1
 
 
 
 
 
 
 
    // /  This HTML file was produced by the ProjectPublisher WebService, By Asaf Shelly                   / //
   // /    WebService URL is: http://Services.AsyncOp.com/ProjectPublisher/ProjectPublisherWSvc.asmx      / //
  // /    Learn more and find the source code here: http://AsyncOp.com                                   / //


// State_Simulation.h : Pseudo Implementation of a Stateful Synchronization Object
//

#pragma once

#include <Windows.h>
#include <StdIO.h>

#include "LoggerAPI.h"



////////////////////////////////////////
///
// STATEFUL CLASS

class State_Simulation
{

protected:

   HANDLE hInternalLock;
   // state 0 - uninitialized; state 1 - initial state; state (-1) - can be deleted
   HANDLE hStateEvent1;
   HANDLE hStateEvent2;
   HANDLE hStateEvent3;
   HANDLE hStateEvent4;
   int lockTimeout;
   char objectName[32];
   void Log(char* info) { ::Log(objectName, info); }
   void Log(char* info, int val) { ::Log(objectName, info, val); }

public:

   State_Simulation(int timeout, char* objName);
   ~State_Simulation();
   // timeout functions: true = completed, false = timedout
   enum : unsigned short { UNINITIALIZED = 0, CAN_DISPOSE = -1 };
   bool SetState(unsigned short int state);
   bool WaitState(unsigned short int state);

};