[lkml]   [2000]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Adding members to task_struct without recompling the kernel
On Tue, 12 Sep 2000 18:17:48 -0400 (EDT), 
Michael Vines <> wrote:
>I'm writing a kernel module that needs to keep track of a pointer to some
>custom module information for every task in the system. Basically I want
>to add another member to task_struct but I don't want to have to
>recompile the kernel to do it.

Your module initialization gets the current maximum number of tasks,
allocates an array of the desired size and stores the size and address
of the array in the module. Then store whatever you want in your
private data area. If the max tasks value changes on the fly,
reallocate your private data. Use a read/write to protect your private
data during resizing.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.059 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site