Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gabriel Krisman Bertazi
linux
Commits
673103a8
Commit
673103a8
authored
4 years ago
by
André Almeida
Browse files
Options
Downloads
Patches
Plain Diff
futex2: Add sysfs entry for syscall numbers
Signed-off-by:
André Almeida
<
andrealmeid@collabora.com
>
parent
2bfe3ef7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/futex2.c
+42
-0
42 additions, 0 deletions
kernel/futex2.c
with
42 additions
and
0 deletions
kernel/futex2.c
+
42
−
0
View file @
673103a8
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment