#include <windows.h>
#include <stdio.h>
#define ALLNUM 10000000
void testlock()
{
int timecode = GetTickCount();
for(long i=0; i<ALLNUM; InterlockedIncrement(&i))
;
printf("locked model use time %d/n", GetTickCount() - timecode);
}
void testunlock()
{
int timecode = GetTickCount();
for(long i=0; i<ALLNUM; i++)
;
printf("unlock model use time %d/n", GetTickCount() - timecode);
{
int timecode = GetTickCount();
for(long i=0; i<ALLNUM; i++)
;
printf("unlock model use time %d/n", GetTickCount() - timecode);
}
HANDLE sema;
void testcore()
{
CreateSemaphore(NULL, 1, 1, NULL);
int timecode = GetTickCount();
for(long i=0; i<ALLNUM/999;)
&
void testcore()
{
CreateSemaphore(NULL, 1, 1, NULL);
int timecode = GetTickCount();
for(long i=0; i<ALLNUM/999;)
&