Skip to content
Snippets Groups Projects
Commit 673103a8 authored by André Almeida's avatar André Almeida
Browse files

futex2: Add sysfs entry for syscall numbers


Signed-off-by: default avatarAndré Almeida <andrealmeid@collabora.com>
parent 2bfe3ef7
No related branches found
No related tags found
No related merge requests found
......@@ -759,6 +759,48 @@ SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake,
return ret;
}
static ssize_t wait_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
return sprintf(buf, "%u\n", __NR_futex_wait);
}
static struct kobj_attribute futex2_wait_attr = __ATTR_RO(wait);
static ssize_t wake_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
return sprintf(buf, "%u\n", __NR_futex_wake);
}
static struct kobj_attribute futex2_wake_attr = __ATTR_RO(wake);
static ssize_t waitv_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
return sprintf(buf, "%u\n", __NR_futex_waitv);
}
static struct kobj_attribute futex2_waitv_attr = __ATTR_RO(waitv);
static struct attribute *futex2_sysfs_attrs[] = {
&futex2_wait_attr.attr,
&futex2_wake_attr.attr,
&futex2_waitv_attr.attr,
NULL,
};
static const struct attribute_group futex2_sysfs_attr_group = {
.attrs = futex2_sysfs_attrs,
.name = "futex2",
};
static int __init futex2_sysfs_init(void)
{
return sysfs_create_group(kernel_kobj, &futex2_sysfs_attr_group);
}
subsys_initcall(futex2_sysfs_init);
static int __init futex2_init(void)
{
int i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment