| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This avoids surprises in the non-threaded runtime with
blocked signals killing the process because they're only
blocked in the main thread and not in the ticker thread.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also some code cleanup, and a fix for an (extant unrelated) missing
<pthread_np.h> include that should hopefully resolve a failure in the
FreeBSD CI build, since it is best to make sure that this MR actually
builds on FreeBSD systems other than mine.
Some unexpected metric changes on FreeBSD (perhaps because CI had been
failing for a while???):
Metric Decrease:
T3064
T5321Fun
T5642
T9020
T12227
T13253-spj
T15164
T18282
WWRec
Metric Increase:
haddock.compiler
|
| |
|
|
|
| |
We can generally be pretty relaxed in the barriers here since the timer
thread is a loop.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reading a timerfd may return 0: https://lkml.org/lkml/2019/8/16/335.
This is currently undocumented behavior and documentation "won't happen
anytime soon" (https://lkml.org/lkml/2020/2/13/295).
With this patch, we just ignore the result instead of crashing. It may
fix #18033 but we can't be sure because we don't have enough
information.
See also this discussion about the kernel bug:
https://github.com/Azure/sonic-swss-common/pull/302/files/1f070e7920c2e5d63316c0105bf4481e73d72dc9
|
| | |
|
| |
|
|
| |
usleep was removed in POSIX.1-2008.
|
| |
|
|
|
|
| |
Previously we ACQUIRE_LOCK and RELEASE_LOCK but these compile to a noop in the
non-threaded RTS, as noted in #16150. Use OS_ACQUIRE_LOCK and OS_RELEASE_LOCK
instead.
|
| |
|
|
|
|
|
|
|
|
|
| |
When we are shutting down the pthread ticker we signal the start_cond condition
variable to ensure that the ticker thread wakes up and exits in a reasonable
amount of time. Previously, when the ticker thread would shut down it was
responsible for freeing the start_cond condition variable. However, this would
lead to a race wherein the ticker would free start_cond, then the main thread
would try to signal it in an effort to wake the ticker (#16150).
Avoid this by moving the mutex destruction to the main thread.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we belch some output to stderr but fail to abort, resulting in
a busy loop. Fixes #15292.
Test Plan:
* Validate
* try running program under environment without timerfd capabilities;
ensure we don't busy-loop
Reviewers: simonmar, erikd
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15929
Differential Revision: https://phabricator.haskell.org/D4875
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Use bool instead of HsBool
* Use barf instead of sysErrorBelch; stg_exit
Test Plan: Validate
Reviewers: erikd, simonmar
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4874
|
| | |
|
| | |
|
| |
|
|
| |
Our new CPP linter enforces this.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C code in the RTS now gets built with `-Wundef` and the Haskell code
(stages 1 and 2 only) with `-Wcpp-undef`. We now get warnings whereever
`#if` is used on undefined identifiers.
Test Plan: Validate on Linux and Windows
Reviewers: austin, angerman, simonmar, bgamari, Phyx
Reviewed By: bgamari
Subscribers: thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3278
|
| |
|
|
|
|
|
|
| |
This is causing too much platform dependent breakage at the moment. We
will need a more rigorous testing strategy before this can be
merged again.
This reverts commit 7e340c2bbf4a56959bd1e95cdd1cfdb2b7e537c2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C code in the RTS now gets built with `-Wundef` and the Haskell code
(stages 1 and 2 only) with `-Wcpp-undef`. We now get warnings whereever
`#if` is used on undefined identifiers.
Test Plan: Validate on Linux and Windows
Reviewers: austin, angerman, simonmar, bgamari, Phyx
Reviewed By: bgamari
Subscribers: thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3278
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate on lots of platforms
Reviewers: erikd, simonmar, austin
Reviewed By: erikd, simonmar
Subscribers: michalt, thomie
Differential Revision: https://phabricator.haskell.org/D2699
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reworks the pthread-based itimer implementation to disarm the timer
when events aren't needed. Thanks to hsyl20 for the nice design.
Test Plan: Validate
Reviewers: hsyl20, simonmar, austin
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2131
GHC Trac Issues: #1623, #11965
|
| |
|
|
| |
It declared nothing.
|
| | |
|
|
|
This shouldn't have any functional changes. It merely splits up what are
essentially three distinct codepaths which are melding together with
CPP.
At the moment I merely #include the implementation to use with CPP
although this really feels very yucky.
Reviewers: erikd, austin, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2130
|