summaryrefslogtreecommitdiffstats
path: root/wrapper.c
Commit message (Collapse)AuthorAgeFilesLines
* libcgroup: Add cgroup_?et_value_* APIsDhaval Giani2008-08-121-0/+194
| | | | | | | | | | | | Adding in APIs which allow you to set and get values from a cgroup controller. Use cgroup_get_controller to get a controller, and then use cgroup_?et_value_* API for your requirement. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@126 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add API to get the cgroup from name (Breaks existing API)Dhaval Giani2008-08-121-7/+29
| | | | | | | | | | | | | | | This patch breaks API. There are no known users at the moment so it is fine. cgroup_new_cgroup now takes in only a name argument. The uids and gids are set by a new API, cgroup_?et_uid_gid() Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@125 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add an API to allow comparision of cgroupsDhaval Giani2008-08-121-0/+62
| | | | | | | | | | | Allows you to compare two cgroups. Their values need to be equal. NULL cgroups are invalid. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@124 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix the wrapper warningsDhaval Giani2008-08-091-2/+3
| | | | | | | | | | | | | | | | | Fixes the following warnings wrapper.c: In function ‘cgroup_add_value_int64’: wrapper.c:152: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int64_t’ wrapper.c:152: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int64_t’ wrapper.c: In function ‘cgroup_add_value_uint64’: wrapper.c:186: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u_int64_t’ wrapper.c:186: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u_int64_t’ Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@122 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix index values in cgroup_add_value_*Dhaval Giani2008-08-091-8/+4
| | | | | | | | | | | | | | | | There is a horrible bug in wrapper.c. The loop was causing a segmentation fault. This is because we were checking for index value as opposed to i. This bug was not hit before, because in all our testing, we were trying out only with CONFIG_FAIR_GROUP_SCHED and we were setting only one value inside the memory subsystem. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@121 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix segmentation fault in APIs.Dhaval Giani2008-06-111-2/+0
| | | | | | | | | | | | | | | | | Dan Smith reported some segmentation faults. It turns out that we did not NULL terminate all the structures when we had moved to the wrapper based approach. With this in mind, the loop checks the index instead of a NULL structure. Also remove unwanted NULL terminations. Thanks to Dan for excellent debugging. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1c@77 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Add v0.1b tagBalbir Singh2008-05-241-0/+236
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@49 4f4bb910-9a46-0410-90c8-c897d4f1cd53