linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help me to hack on the task_struct
@ 2002-12-06  4:10 Matt Young
  0 siblings, 0 replies; only message in thread
From: Matt Young @ 2002-12-06  4:10 UTC (permalink / raw)
  To: linux-kernel

When hacking with my module code: 

I do not get reasonable results when using the "current"  macro to access 
parts of the task structure.

Things seem to diverge past a thing called rlim in the task_struct..
There are supposedly RLIM_NLIMITS of these rlims.

So I looked through that wonderful cross reference at sourceforge
to discover these defined in resource.h:

#define RLIMIT_CPU      0               /* CPU time in ms */
#define RLIMIT_FSIZE    1               /* Maximum filesize */
#define RLIMIT_DATA     2               /* max data size */
#define RLIMIT_STACK    3               /* max stack size */
#define RLIMIT_CORE     4               /* max core file size */
#define RLIMIT_RSS      5               /* max resident set size */
#define RLIMIT_NPROC    6               /* max number of processes */
#define RLIMIT_NOFILE   7               /* max number of open files */
#define RLIMIT_MEMLOCK  8               /* max locked-in-memory address space 
*/
#define RLIMIT_AS       9               /* address space limit */
#define RLIMIT_LOCKS    10              /* maximum file locks held */
#define RLIM_NLIMITS    11

Questions:
Why do resource limits happen to count sequencially?

And can I expect the task structure in sched.h to conform to the compiled
kernel?

With my SUSE 8.1 linux. I am using 2.4.19 in my headers and 2.4.19GB in the
runnitg kernel. (Insmod bitches a little)

Any clues are appreciated.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-06  4:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-06  4:10 Help me to hack on the task_struct Matt Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).