]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
include/tasks.h: introduce coding style changes
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 16 Mar 2022 16:17:11 +0000 (21:47 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 16 Mar 2022 21:38:20 +0000 (15:38 -0600)
This patch introduces coding style changes such as reverse xmas tree
local variable declarations, header file reordering, and many other
minor tweaks such as line spacing, removing trailing white spaces.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
include/libcgroup/tasks.h

index 554fe34ed504bf0c0ab55e4deb8906fce36eb837..77a85265f4aaa68db26f32b79f4e4c54fd5c1e43 100644 (file)
@@ -52,7 +52,7 @@ enum cgroup_daemon_type {
 int cgroup_attach_task(struct cgroup *cgroup);
 
 /**
- * Move given task (=thread) to to given control group.
+ * Move given task (=thread) to given control group.
  * @param cgroup Destination control group.
  * @param tid The task to move.
  */
@@ -70,18 +70,18 @@ int cgroup_attach_task_pid(struct cgroup *cgroup, pid_t tid);
  * @todo should this function be really public?
  */
 int cgroup_change_cgroup_path(const char *path, pid_t pid,
-               const char * const controllers[]);
+                             const char * const controllers[]);
 
 /**
  * Get the current control group path where the given task is.
  * @param pid The task to find.
  * @param controller The controller (hierarchy), where to find the task.
  * @param current_path The path to control group, where the task has been found.
- *     The patch is relative to the root of the hierarchy. The caller must
- *     free this memory.
+ *     The patch is relative to the root of the hierarchy. The caller must
+ *     free this memory.
  */
 int cgroup_get_current_controller_path(pid_t pid, const char *controller,
-                                       char **current_path);
+                                      char **current_path);
 
 /**
  * @}
@@ -141,7 +141,7 @@ int cgroup_change_all_cgroups(void);
  * the configuration file each time it is called.
  *
  * The flags can alter the behavior of this function:
- *     CGFLAG_USECACHE: Use cached rules instead of parsing the config file
+ *     CGFLAG_USECACHE: Use cached rules instead of parsing the config file
  *      CGFLAG_USE_TEMPLATE_CACHE: Use cached templates instead of
  * parsing the config file
  *
@@ -154,7 +154,7 @@ int cgroup_change_all_cgroups(void);
  * @todo Determine thread-safeness and fix of not safe.
  */
 int cgroup_change_cgroup_flags(uid_t uid, gid_t gid,
-               const char *procname, pid_t pid, int flags);
+                              const char *procname, pid_t pid, int flags);
 
 /**
  * Changes the cgroup of a program based on the rules in the config file.  If a
@@ -170,7 +170,7 @@ int cgroup_change_cgroup_flags(uid_t uid, gid_t gid,
  * @todo Determine thread-safeness and fix if not safe.
  */
 int cgroup_change_cgroup_uid_gid_flags(uid_t uid, gid_t gid,
-                               pid_t pid, int flags);
+                                      pid_t pid, int flags);
 
 /**
  * Provides backwards-compatibility with older versions of the API.  This
@@ -199,7 +199,7 @@ int cgroup_change_cgroup_uid_gid(uid_t uid, gid_t gid, pid_t pid);
  * If the daemon does not work, this function returns 0 as success.
  * @param pid The task id.
  * @param flags Bit flags to change the behavior, as defined in
- *     #cgroup_daemon_type
+ *     #cgroup_daemon_type
  */
 int cgroup_register_unchanged_process(pid_t pid, int flags);