#include<Windows.h>
#include<stdio.h>
#include<process.h>#pragmacomment(lib,"libcmt.lib")constintNLOOP=100;intcounter=0;
voiddoit(void*);CRITICAL_SECTIONbeswap;intmain()
{HANDLEpnt[2];InitializeCriticalSection(&beswap);pnt[0]=(HANDLE)_beginthread(doit,0,NULL);
pnt[1]=(HANDLE)_beginthread(doit,0,NULL);WaitForMultipleObjects(2,pnt,TRUE,1000L);DeleteCriticalS...[阅读全文]