hi, intel processors got 4 privilage mode,0-3, when processor is in kernel mode the segmentation hardware loaded the segment descriptor with kernel code and kernel data segment and set their flag to highest privilage level,you are in user code and user data segment and trying to access something which you never reach,if you need to access any kernel data structure then data segment must set to kernel data segment,but still yr code segment remains set tp user code segment this is again checked by processor,so u never access kernel data struture from user mode, thus kernel modules are used for these things which are dynamically linked kernel code extensions, yes you directly get pid from task structure, but genrally,usual way is to use the functions exported by kernel to get yr work done ,you will get this from /proc/ksyms lots of info. is on web about module programming and yes the bible for newbies linux device driver by rubini is always there Prasanna --- Vincenzo Mallozzi <vinjunior@yahoo.it> wrote: > Hi all, > I'm trying to develop a C program that access to > process descriptor information but I have had some > problem with libraries. > In particular, I've developed a program like this: > > #include <linux/sched.h> > > int main(void){ > pid_t pid; > .... > task_struct process = find_task_by_pid(pid); > ... > } > > but the compiler can't find get_task_by_pid > function, > while this is a function declared in > include/linux/sched.h. > What's wrong? > Are there other methods to access process descriptor > pointer? > Thanks. > Vincenzo Mallozzi. > > > > > > > ____________________________________________________________ > Yahoo! Companion - Scarica gratis la toolbar di > Ricerca di Yahoo! > http://companion.yahoo.it > > -- > Kernelnewbies: Help each other learn about the Linux > kernel. > Archive: > http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/