#if defined(_MSC_VER)
#include <wtypes.h>
#include <WinBase.h>
#include <process.h>
#define TNULL NULL
#define thdl HANDLE
#define TAPI DWORD WINAPI
#define texit() return 0
#define topen(hdl, func, arg) hdl = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, arg, 0, NULL)
#define tclose(hdl) if (NULL != hdl){
WaitForSingleObject(hdl, INFINITE);CloseHandle(hdl); hdl = NULL;}
#define tname(n)
#elif defined(_LINUX_) || defined(_ANDROID_)
#include <time.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/prctl.h>
#define
C/C++ 线程的创建和释放
于 2024-07-29 11:22:25 首次发布