Kaydet (Commit) 8e7997fe authored tarafından Michael Stahl's avatar Michael Stahl

sal: WNT: print errno when oslCreateThread fails

Change-Id: Iad0a2a7ba68b3f43c22e0b5a3cee646f8baba30e
üst 33a2e47c
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <osl/time.h> #include <osl/time.h>
#include <osl/interlck.h> #include <osl/interlck.h>
#include <rtl/tencinfo.h> #include <rtl/tencinfo.h>
#include <errno.h>
/* /*
Thread-data structure hidden behind oslThread: Thread-data structure hidden behind oslThread:
...@@ -94,6 +95,25 @@ static oslThread oslCreateThread(oslWorkerFunction pWorker, ...@@ -94,6 +95,25 @@ static oslThread oslCreateThread(oslWorkerFunction pWorker,
if(pThreadImpl->m_hThread == 0) if(pThreadImpl->m_hThread == 0)
{ {
switch (errno)
{
case EAGAIN:
fprintf(stderr, "_beginthreadex errno EAGAIN\n");
break;
case EINVAL:
fprintf(stderr, "_beginthreadex errno EINVAL\n");
break;
case EACCES:
fprintf(stderr, "_beginthreadex errno EACCES\n");
break;
case ENOMEM:
fprintf(stderr, "_beginthreadex undocumented errno ENOMEM - this means not enough VM for stack\n");
break;
default:
fprintf(stderr, "_beginthreadex unexpected errno %d\n", errno);
break;
}
/* create failed */ /* create failed */
free(pThreadImpl); free(pThreadImpl);
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment