]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
resource: add helpers for fetching rlimits
authorJiri Slaby <jslaby@suse.cz>
Thu, 19 Nov 2009 16:16:37 +0000 (17:16 +0100)
committerJiri Slaby <jslaby@suse.cz>
Mon, 4 Jan 2010 10:35:18 +0000 (11:35 +0100)
commit3e10e716abf3c71bdb5d86b8f507f9e72236c9cd
treec0dee002666c9aaf9862f3ec1140c5946461ec54
parent96d07d211739fd2450ac54e81d00fa40fcd4b1bd
resource: add helpers for fetching rlimits

We want to be sure that compiler fetches the limit variable only
once, so add helpers for fetching current and maximal resource
limits which do that.

Add them to sched.h (instead of resource.h) due to circular dependency
 sched.h->resource.h->task_struct
Alternative would be to create a separate res_access.h or similar.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: James Morris <jmorris@namei.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
include/linux/sched.h