summaryrefslogtreecommitdiffstats
path: root/libcgroup.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.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.h')
-rw-r--r--libcgroup.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcgroup.h b/libcgroup.h
index fe13758..ae73a22 100644
--- a/libcgroup.h
+++ b/libcgroup.h
@@ -168,6 +168,10 @@ int cgroup_delete_cgroup(struct cgroup *cgroup, int ignore_migration);
int cgroup_attach_task_pid(struct cgroup *cgroup, pid_t tid);
struct cgroup *cgroup_get_cgroup(struct cgroup *cgroup);
+/* Changes the cgroup of calling application based on rule file */
+int cgroup_change_cgroup_uid_gid(uid_t uid, gid_t gid, pid_t pid);
+int cgroup_change_cgroup_path(char *path, pid_t pid, char *controllers[]);
+
/* The wrappers for filling libcg structures */
struct cgroup *cgroup_new_cgroup(const char *name);