send/recv works fine on the new connected socket. However When I create a thread, try to call recvin that thread, recv returns an -1 , and errno is set to 0x80410005.
Code: Select all
newsock = accept(sd, &sockaddr, &addrlen);
if(newsock == -1)
{
printf("Invalid new connection received\n");
closesocket(sd);
return -1;
}
printf("Accepted a new connection: %d\n",newsock);
gNewSock = newsock; //assign to a global var
//testSock(); // this function calls recv on gNewSock, and works fine.
thid = sceKernelCreateThread("childThread", testSock, 0x11, 0xFA0, PSP_THREAD_ATTR_USER, 0); // testSock doesnt works fine from thread..
I tried looking up 0x80410005 in error codes but could not find it. I am building as prx, and downloading to a 3.71 m33 via USBHostFs.