看不懂
程序代码:
#include <windows.h> #include <process.h> #include <stdio.h> DWORD WINAPI ThreadProc(LPVOID lpParam) { while (1) {} return 0; } int main(void) { SYSTEM_INFO si; int i = 0; HANDLE hThread[256]; GetSystemInfo(&si); while (i++ < si.dwNumberOfProcessors - 1) { hThread[i] = _beginthreadex(NULL, 0, ThreadProc, 0, 0, NULL); } i--; WaitForSingleObject(hThread, INFINITE); while (1) {} return 0; }
我用的gcc编译的 不过移植VC是比较容易的
[ 本帖最后由 zklhp 于 2013-7-6 17:51 编辑 ]