Nikolaj Bjorner
5844964d95
rename temporary macro
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-18 17:17:51 -07:00
Nuno Lopes
f3cd7d646d
further simplifications to scoped_timer
2019-02-21 10:42:42 +00:00
Nuno Lopes
73f6806371
rewrite scoped_timer in C++11 way
...
the code is much smaller and reused across platforms
I see a small speedup on linux as well
2019-02-04 17:42:27 +00:00
Bruce Mitchener
b83d6d77c9
Use nullptr rather than 0/NULL.
2018-11-28 14:57:01 +07:00
Bruce Mitchener
a76397d3b8
Refer to macOS rather than Mac OS / OSX.
2018-10-02 17:38:09 +07:00
Nikolaj Bjorner
d74978c277
fix #1762 , #1764 , #1768
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-26 20:29:26 +01:00
Nikolaj Bjorner
b5f067bec5
fix #1592 #1587
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-04-25 11:18:24 +02:00
Pierre Pronchery
5f7bd993de
Add support for NetBSD
...
Originally from David Holland <dholland@NetBSD.org>.
2018-03-13 21:59:35 +01:00
Bruce Mitchener
76eb7b9ede
Use nullptr.
2018-02-12 14:05:55 +07:00
Nikolaj Bjorner
bc8ae21ebe
missing parameters for OSX/Linus
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-18 15:14:47 -07:00
Nikolaj Bjorner
7a977f0106
ensure that timeouts are distinguished from other cancel events #848
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-18 14:54:54 -07:00
Nikolaj Bjorner
b19f94ae5b
make include paths uniformly use path relative to src. #534
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 13:24:11 -07:00
Dan Liew
b5aa6d5eb5
Fix issue with bd1f07f864
pointed out by
...
@nunolopes .
If `pthread_cond_signal()` is called while `m_mutex` is held then the
timing thread might be woken up twice due to waking up from
`pthread_cond_timeout()` (due to being signaled) but then being forced
to sleep again because the thread calling `~imp()` is still holding
`m_mutex` (which the timing thread needs to acquire).
2016-12-19 22:36:42 +00:00
Dan Liew
bd1f07f864
Fix implementation of scoped_timer
under Linux where it was
...
incorrectly assumed that `pthread_cond_timedwait()` would exit
due to a condition variable being signaled or a timeout occuring.
According to the documentation `pthread_cond_timedwait()` might
spuriously wake so we introduce a new variable `m_signal_sent` (that is
guarded by an existing mutex) that is used as the variable to check that
the thread wake was not spurious.
This is intended to partially fix #839 .
2016-12-11 23:12:36 +00:00
Nikolaj Bjorner
e9db934f1a
improving perf of mutex finding, revert semantics of 0 timeout to no-timeout. Issue #791
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-11-17 04:26:17 +02:00
Nuno Lopes
4b0f2cae0d
fix compiler warning in scoped_timer.cpp on linux
...
2 secs in nanosec representation still fit in 31 bits, so no need for ULL
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
2015-12-08 17:03:18 +00:00
Nuno Lopes
d9bafc3fba
rewrite scoped_timer for linux
...
The previous version was racy and could lead to crashes.
The timer could be deleted before the callback was called, making it execute on already freed memory
This new version is similar to Mac's. It spawns its own thread and uses pthread_cond_wait.
Care is taken for small timeouts to avoid races in the thread creation and timer destruction.
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
2015-11-22 11:40:52 +00:00
Nikolaj Bjorner
fc592fc856
fix for #291 . The root issue is that the set of antecedents is recycled as a fixed object between routines. Antecedents that were already allocated for a Gomory cut got reset by the internalizer. This causes unsound bounds axioms to be created
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-11-05 15:08:42 -08:00
Christoph M. Wintersteiger
f3441c6a9b
tabs and indentation
2015-09-17 13:25:22 +01:00
Nikolaj Bjorner
c6683fd6fa
to fix that timeout of 0 has different interpretations across platforms
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-10-05 12:27:57 -07:00
Christoph M. Wintersteiger
581bbb58fb
typo
...
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2014-05-02 18:04:32 +01:00
Christoph M. Wintersteiger
8150bd5617
OSX timeout handling bugfix
2014-05-02 17:58:17 +01:00
Leonardo de Moura
9674f511b3
Fix scoped_timer for Linux. Nested timers were misbehaving, and it was not possible to create timers in more than one thread
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-12-17 20:46:04 -08:00
Leonardo de Moura
8d45de02c5
Fixed timer bug on freebsd
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-12-07 06:07:57 -08:00
Leonardo de Moura
5e4d1151eb
fixing clang compilation problems
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-12-05 15:20:16 -08:00
Leonardo de Moura
b169963909
fixed FreeBSD support
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-11-18 00:09:45 -08:00
Leonardo de Moura
1a3eb3a2ed
Added support for FreeBSD
2012-11-18 00:05:32 -08:00
Leonardo de Moura
2c464d413d
Reorganizing source code. Created util dir
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-20 10:19:38 -07:00