Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lehrstuhl für Informatik 4 (Systemsoftware)
manycore
emper
Commits
1d164e81
Commit
1d164e81
authored
3 years ago
by
Florian Fischer
Browse files
Options
Downloads
Patches
Plain Diff
do not define futex_waitv if already done in linux/futex.h
parent
6d2608c9
No related branches found
Branches containing commit
No related tags found
1 merge request
!345
do not define futex_waitv if already done in linux/futex.h
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
emper/lib/sync/SpuriousFutex2Semaphore.cpp
+6
-2
6 additions, 2 deletions
emper/lib/sync/SpuriousFutex2Semaphore.cpp
emper/lib/sync/meson.build
+5
-0
5 additions, 0 deletions
emper/lib/sync/meson.build
with
11 additions
and
2 deletions
emper/lib/sync/SpuriousFutex2Semaphore.cpp
+
6
−
2
View file @
1d164e81
...
...
@@ -10,6 +10,7 @@
#include
<cerrno>
#include
"Worker.hpp"
#include
"emper-config.h"
#ifndef SYS_futex_waitv
#define SYS_futex_waitv 449
...
...
@@ -19,18 +20,21 @@
#define FUTEX_32 2
#endif
#ifdef EMPER_DEFINE_FUTEX_WAITV
struct
futex_waitv
{
uint64_t
val
;
uint64_t
uaddr
;
uint32_t
flags
;
uint32_t
_reserved
;
// NOLINTNEXTLINE(bugprone-reserved-identifier)
uint32_t
__reserved
;
};
#endif
static
void
init_futex_waitv
(
struct
futex_waitv
*
waiter
,
uint64_t
val
,
void
*
uaddr
)
{
waiter
->
val
=
val
;
waiter
->
uaddr
=
reinterpret_cast
<
uintptr_t
>
(
uaddr
);
waiter
->
flags
=
FUTEX_PRIVATE_FLAG
|
FUTEX_32
;
waiter
->
_reserved
=
0
;
waiter
->
_
_
reserved
=
0
;
}
namespace
emper
::
lib
::
sync
{
...
...
This diff is collapsed.
Click to expand it.
emper/lib/sync/meson.build
+
5
−
0
View file @
1d164e81
if
not
cpp_compiler
.
has_member
(
'struct futex_waitv'
,
'val'
,
prefix
:
'#include <linux/futex.h>'
)
conf_data
.
set
(
'EMPER_DEFINE_FUTEX_WAITV'
,
true
)
endif
emper_cpp_sources
+=
files
(
'SpuriousFutex2Semaphore.cpp'
,
)
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