Not sure of the answer, my guess would be to expect two processes, one for the main and one for the thread; however in MY particular case, I see one process. x86 32-bit machine, nothing special.
And what I did to see some more information is I added some debug prints:
printf("thread PID: %d\n", getpid());
printf("main PID: %d\n", getpid());
int retval = pthread_create(&tid,NULL,task,NULL);
The result was my thread PID and main PID were the same. Perhaps you should add similar debug to determine what PID values are created and understood from within each part of that. My first question actually was to be:
What are the parents for each of those? Was it actually 1116?
I didn't think it likely that 1116 was the parent because it's much lower than the other PIDs, except that maybe 1116 is the PID of the shell/terminal which you're running from. Still, it would seem that the parent of the second and third thread should be the original main process PID.
The only other thought is that I once heard of supervisory threads which were a thread created to look after other threads, leading to exactly what you have here. The main PID, a supervisory thread PID, and then the thread intentionally created PID.
Other final thought is that MIPS is a pipeline processor, not that there aren't other levels of sophisitication on other processors, but MIPS has always been funny like that. Unsure if that has something to do with this.