What the fork()?
What the fork()?
I have made a couple of tiny apps for the PSP, and I'm currently working on something much bigger. Moving from a unix-ese background of c++ programming naturally the first think I thought to try with multithreading is the classic fork() instruction. While it did compile it did not create a child thread. So my question is: Has anyone tired multithreading a program and if so, how did you get it to work?
Now can the stack frame fall through main or does it require to be de-instantiated using it's thread id? (aka, does the de-instantiation routine at the end of the main() function always kill the primary thread made upon instantiation of the program itself or the current thread being executed relative to the current stack frame)
Also, is the newly created stack frame empty or does it posess the information carried by the old thread (aka, can the new thread safely return from the function it started without underflowing the stack)
Since you were so nice about the last question, what about these?
Also, is the newly created stack frame empty or does it posess the information carried by the old thread (aka, can the new thread safely return from the function it started without underflowing the stack)
Since you were so nice about the last question, what about these?
When you return from a thread on the PSP the stack is maintained because the thread only goes in to an exited state instead of deleting itself. However you can call something like sceKernelExitDeleteThread() to ensure the thread exits and is removed from the system.
And as far as I know no infomation is implicitly carried over to the new thread, however when you start it you can pass an arbitrary binary string which will be copied onto the new threads stack.
And as far as I know no infomation is implicitly carried over to the new thread, however when you start it you can pass an arbitrary binary string which will be copied onto the new threads stack.