Board.KolibriOS.org

Official KolibriOS board
It is currently Thu Apr 25, 2019 1:34 pm

All times are UTC+03:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: processes and threads
PostPosted: Wed Feb 27, 2013 3:40 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
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?

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
PostPosted: Wed Feb 27, 2013 3:56 pm 
Offline
Kernel Developer

Joined: Wed Mar 08, 2006 6:25 pm
Posts: 3952
You can check APPDATA.dir_table. It contain page directory table address and all multi-threads share same value.


Top
   
PostPosted: Wed Feb 27, 2013 4:09 pm 
Offline
Kernel Developer

Joined: Sun Feb 10, 2013 12:37 pm
Posts: 2329
I agree if it not requires correction code at the application level.

_________________
Всем чмоки в этом проекте! Засуньте эти 11 лет себе в жопу!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited