Page 1 of 1

processes and threads

Posted: Wed Feb 27, 2013 3:40 pm
by hidnplayr
Dear fellow kernel programmers,

Currently there is no way in KolibriOS to tell which thread belongs to what process, because there is no real process identifier.
There is field called PID, but it practice, it seems to be the thread identifier.

Therefore, I propose to rename the field pid in struct TASKDATA to tid, and introduce a new field pid.
All current references to TASKDATA.pid shall be changed to TASKDATA.tid

The procedure new_sys_threads should then be updated to copy the PID of the process to the new thread.
(Single threaded processes will have PID == TID)

Am I forgetting something? Do you think it's a good idea?

Re: processes and threads

Posted: Wed Feb 27, 2013 3:56 pm
by Serge
You can check APPDATA.dir_table. It contain page directory table address and all multi-threads share same value.

Re: processes and threads

Posted: Wed Feb 27, 2013 4:09 pm
by Mario_r4
I agree if it not requires correction code at the application level.