I have searched around MSDN and the forums here, but I can't figure this out.
I have a program start, create multiple threads with the same priority, and everything goes well. My goal was to have one of these threads halt until I pressed a key on my keyboard. This thread communicates with my EE SIO cable and hyperterminal on my PC. The problem is, when my thread calls sio_getc(); in a while loop, it halts all of my other threads and main(); I know that SIOSHELL in the SVN idles in the background of the PS2 until the Enter key is pressed on the PC keyboard. It then takes control. When you type exit, it resumes control to the OS of the PS2. How could I set up this thread to do the same thing, without causing all of my other threads to halt? ANy help is appreciated. Thanks
Running Multiple Threads Help
...most probably you have your code like this:
try to change it to this:
Code: Select all
while ( ( chr = sio_getc () ) < 0 );
Code: Select all
while ( ( chr = sio_getc () ) < 0 ) RotateThreadReadyQueue ( <priority of your threads> );
Keeping em alive
I have been tinkering around with threads and can run multiple threads that do different things with no problem. How can I create a thread that runs within kernel memory, so when user memory is reset, it will continue to run? Thx
This thread has some information about keeping code in RAM:
http://forums.ps2dev.org/viewtopic.php?t=5553
http://forums.ps2dev.org/viewtopic.php?t=5553