Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ Pbm With Task_struct

Posted by: bobjr72 Oct 29 2002, 02:15 PM

Hi all !
I am trying to use a task_struct pointer in order to analyze a process. But I can not have any pointer on a task_struct to ask some field.
Someone could help me ?

I tryed something like :

#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <asm/current.h>

struct task_struct *h=get_current();

printf("n h : %d ",h);
printf("n &h : %d ",&h);

printf("n *h : %l ",h->pid); // it doesn't work

Powered by Invision Power Board (
© Invision Power Services (