lkml.org 
[lkml]   [2002]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: accessing the struct task_struct using a pid
On Sat, Jun 15, 2002 at 02:06:20PM -0700, Amit Nadgar wrote:
> I am writing a kernel module where I am trying to
> access the task_structs. Now I have tried this using
> various mathods.
> 1) Using the pidhash array.
> Here when I do a insmod I get a unresolved symbol.

EXPORT_SYMBOL(pidhash) or something. Make sure you included sched.h

On Sat, Jun 15, 2002 at 02:06:20PM -0700, Amit Nadgar wrote:
> 2) Directly accessing the location of pidhash as seen in System.map.
> Here when the pidhash_fn hashes the supplied pid the particular
> location into which it indexes in NULL.

How early are you trying to do this?

On Sat, Jun 15, 2002 at 02:06:20PM -0700, Amit Nadgar wrote:
> 3) Starting from the init_task.
> here the next task after the init task is found to be NULL.

Don't do that.

On Sat, Jun 15, 2002 at 02:06:20PM -0700, Amit Nadgar wrote:
> Could some one help me in this matter.

I'm afraid there's only so much help that can be given. Some effort may
be required on your part to make this work. Help with basic concepts
and Linux conventions is more likely to be found on irc.openprojects.net
#kernelnewbies or the kernelnewbies@nl.linux.org mailing list.


Cheers,
Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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