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
Merge requests
!231
Move emper::sleep() implemention from header in compilation unit
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Move emper::sleep() implemention from header in compilation unit
flow/emper:emper-sleep-in-module
into
master
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Florian Schmaus
requested to merge
flow/emper:emper-sleep-in-module
into
master
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
e2266980
1 commit,
3 years ago
2 files
+
19
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
emper/include/emper.hpp
+
2
−
13
Options
// SPDX-License-Identifier: LGPL-3.0-or-later
// Copyright © 2020 Florian Schmaus
// Copyright © 2020
-2021
Florian Schmaus
#pragma once
#include
<cassert>
@@ -10,7 +10,6 @@
#include
"Fiber.hpp"
#include
"Runtime.hpp"
#include
"SynchronizedFiber.hpp"
#include
"io/Future.hpp"
void
async
(
Fiber
*
fiber
)
{
assert
(
fiber
!=
nullptr
);
@@ -75,16 +74,6 @@ void yield() {
runtime
->
yield
();
}
auto
sleep
(
unsigned
int
seconds
)
->
bool
{
if
constexpr
(
!
emper
::
IO
)
{
DIE_MSG
(
"sleep requires emper::io"
);
}
emper
::
io
::
AlarmFuture
::
Timespec
ts
=
{.
tv_sec
=
seconds
,
.
tv_nsec
=
0
};
emper
::
io
::
AlarmFuture
alarm
(
ts
);
int32_t
res
=
alarm
.
submitAndWait
();
return
res
==
-
ETIME
;
}
auto
sleep
(
unsigned
int
seconds
)
->
bool
;
}
// namespace emper
Loading