From d447ea2f30ec60370ddb99a668e5ac12995f043d Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 29 Apr 2008 01:00:08 -0700 Subject: cgroups: add the trigger callback to struct cftype Trigger callback can be used to receive a kick-up from the user space. The string written is ignored. The cftype->private is used for multiplexing events. Signed-off-by: Pavel Emelyanov Acked-by: Paul Menage Acked-by: KAMEZAWA Hiroyuki Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/cgroup.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 785a01cfb49d..2d1d151258cf 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -243,6 +243,14 @@ struct cftype { */ int (*write_s64) (struct cgroup *cgrp, struct cftype *cft, s64 val); + /* + * trigger() callback can be used to get some kick from the + * userspace, when the actual string written is not important + * at all. The private field can be used to determine the + * kick type for multiplexing. + */ + int (*trigger)(struct cgroup *cgrp, unsigned int event); + int (*release) (struct inode *inode, struct file *file); }; -- cgit v1.2.2