processes and threads
Page 1 of 1

Author:  hidnplayr [ Wed Feb 27, 2013 3:40 pm ]
Post subject:  processes and threads

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 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?

Author:  Serge [ Wed Feb 27, 2013 3:56 pm ]
Post subject:  Re: processes and threads

You can check APPDATA.dir_table. It contain page directory table address and all multi-threads share same value.

Author:  Mario_r4 [ Wed Feb 27, 2013 4:09 pm ]
Post subject:  Re: processes and threads

I agree if it not requires correction code at the application level.

Page 1 of 1 All times are UTC+03:00
Powered by phpBB® Forum Software © phpBB Limited