From: Matt Young <wz6b@arrl.net>
To: linux-kernel@vger.kernel.org
Subject: Help me to hack on the task_struct
Date: Thu, 5 Dec 2002 20:10:53 -0800 [thread overview]
Message-ID: <200212052010.53696.wz6b@arrl.net> (raw)
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.
reply other threads:[~2002-12-06 4:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200212052010.53696.wz6b@arrl.net \
--to=wz6b@arrl.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®