#include <../source/TAL/objbase.h>
#include <../source/PAL/dataman.h>

void	print_tsd(char *ind)
{
	char *tsd;
	tsd=(char*)GetThreadData();
	conPrintf("%s: TSD %X, magic '%c%c%c%c'\n",ind,tsd,tsd[3],tsd[2],tsd[1],tsd[0]);
}
	
void V_CALL t2(void *arg)
{
	print_tsd("T2");
	timeDelay(1000);
	threadExit(0);
}

int main()
{
	thread_t t;
	logStartConsoleLog();
	logUpperLevel(LOG_TRACE);
	print_tsd("T1-1");
	t=threadCreate(t2,NULL);
	print_tsd("T1-2");
	threadJoin(t,NULL);
	print_tsd("T1-3");
	return 0;
}
