summaryrefslogtreecommitdiffstats
path: root/libcgroup-internal.h
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2008-08-13 19:58:05 +0000
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2008-08-13 19:58:05 +0000
commitbc1e2f6df728f682d4d09a725a62e02547d833db (patch)
treeb662f1e2623ca270d2eecd5f87a1ccd483e5fda2 /libcgroup-internal.h
parent2fa28d8f1be10453f31deb1504ad6b5e017db5b9 (diff)
downloadlibcg-bc1e2f6df728f682d4d09a725a62e02547d833db.tar.gz
libcg-bc1e2f6df728f682d4d09a725a62e02547d833db.tar.xz
libcg-bc1e2f6df728f682d4d09a725a62e02547d833db.zip
libcgroup: New API interfaces for task placement
From: Vivek Goyal <vgoyal@redhat.com> Enhancement to libcg to do following. - Parse the /etc/cgrules.conf file and place the task in the right cgroup. - Exported two APIs which can place the task based on /etc/cgrules.conf or based on cgroup explicitly specified by the caller. - There can be multiple users. - PAM module (pam_cgroup) - cgexec tool - cgclassify tool - APIs can be directly used by other cgroup aware user progarams. - Classification daemon Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@136 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'libcgroup-internal.h')
-rw-r--r--libcgroup-internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcgroup-internal.h b/libcgroup-internal.h
index ce2c7c9..c01dfa9 100644
--- a/libcgroup-internal.h
+++ b/libcgroup-internal.h
@@ -19,6 +19,9 @@
__BEGIN_DECLS
#include <libcgroup.h>
+#include <limits.h>
+
+#define CGRULES_CONF_FILE "/etc/cgrules.conf"
struct control_value {
char name[FILENAME_MAX];
@@ -47,6 +50,15 @@ struct cg_mount_table_s {
char path[FILENAME_MAX];
};
+struct cgroup_rules_data {
+ pid_t pid; /* pid of the process which needs to change group */
+
+ /* Details of user under consideration for destination cgroup */
+ struct passwd *pw;
+ /* Gid of the process */
+ gid_t gid;
+};
+
__END_DECLS
#endif