How to initialize the new attributes in process control block.
Mulyadi Santosa
mulyadi.santosa at gmail.com
Sun May 15 13:40:25 EDT 2016
On Sat, May 14, 2016 at 4:16 PM, Youcun Liu <liuyoucun1993 at gmail.com> wrote:
> Dear all,
>
> I am now working on building my own linux kernel and I want to add a new
> attribute into the process control block. Then I will feed some data to the
> new attribute from a user application. Finally I want to use the date to
> improve the some original kernel algorithm(e.g process schduling).
>
> I tried to initialize the new attribute directly in the 'task_struct',
> obviously, it failed. So I decide to initialize the new attribute at the
> very beginning, but I do not know how. Besides, I have trouble in finding
> out which function can help me feed data to the new attribute.
>
> Could you please give me some suggestions and help? Thanks a lot.
>
> Best regards,
> Youcun Liu
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
Hi...
How did you exactly initialize PCB or task_struct? Could you elaborate?
IIRC, sometimes variables under task_struct is accessed using offset, so if
you insert new variable in the middle, there is a chance you messed it up.
There might be other constraints, though. CMIIW
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160516/cf48c12b/attachment.html
More information about the Kernelnewbies
mailing list