1. Initialization

Initialization

Application must initialize libcgroup using cgroup_init() before any other libcgroup function can be called.

libcgroup caches information about mounted hierarchies (just what's mounted where, not the control groups themselves) at this time. There is currently no way to refresh this cache, i.e. all subsequent mounts/remounts/unmounts are not reflected in this cache and libcgroup may produce unexpected results.

In addition, there is no way how to clean the cache on application exit.

Todo:
this is very bad... There should be at least way how to refresh the cache and/or an option to refresh it automatically (does kernel provide any indication, when a filesystem is mounted/unmounted?). Dtto the cleanup on exit.


int cgroup_init (void)
 Initialize libcgroup.
int cgroup_get_subsys_mount_point (const char *controller, char **mount_point)
 Returns path where is mounted given controller.

Function Documentation

int cgroup_get_subsys_mount_point ( const char *  controller,
char **  mount_point 
)

Returns path where is mounted given controller.

Applications should rely on libcgroup API and not call this function directly.

Parameters:
controller Name of the controller
mount_point The string where the mount point location is stored. Please note, the caller must free the mount_point.
int cgroup_init ( void   ) 

Initialize libcgroup.

Information about mounted hierarchies are examined and cached internally (just what's mounted where, not the groups themselves).


Generated on 31 Mar 2010 for libcgroup by  doxygen 1.6.1