#include <windows.h>
#include <ack_w32.h>

HANDLE
AcksysCreateThread(LPTHREAD_START_ROUTINE task, LPVOID arg)
{
	HANDLE thd;
	DWORD tid;

	thd = (HANDLE)_beginthreadex(NULL,0,task,arg,0,&tid);
	if(thd == NULL){
		printf("err AcksysCreateThread %d, errno %d\n",
			GetLastError(),errno);
		exit(1);
	}
	return thd;
}

void
AcksysExitThread(DWORD retval)
{
	_endthreadex(retval);
}
