lkml.org 
[lkml]   [2000]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Adding members to task_struct without recompling the kernel
Date
On Tue, 12 Sep 2000 18:17:48 -0400 (EDT), 
Michael Vines <mjvines@undergrad.math.uwaterloo.ca> 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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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