Re: struct task_struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 27, 2001 at 02:27:03PM +0530, C. Mohanasundaram wrote:

> Hi all,
> 
> i have written a kernel module while modifies the sys_call_table and inserts 
> new syscalls to bring some performance counters to the userland.

my first question has to be why : perfctr has supported this ably for a long time,
and msr.c can also do this.

Or is this not x86 ?

> the process information is stored in a link list of struct task_struct.
> If i can copy the contents of the link list to the user memory 
> using the macro for_each_task(p) defined in linux/sched.h
> 
>          for_each_task (p) {
> 	/*do copy and all that stuff*/
>         }

don't do this - export exactly what you need, maybe as an array.

And a syscall is prolly a bad idea anyway.

regards
john

-- 
"If the software that a company produces isn't reliable, adding a bunch of
'Mother, may I' rules to the language and the code won't fix it."
	- Pete Becker
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux