Commit graph

13 commits

Author SHA1 Message Date
Andrei Alexeyev
8b37d1cbf2
src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
Andrei Alexeyev
be7905d6a3
src: run upkeep 2024-05-17 04:58:47 +02:00
Andrei Alexeyev
711edc218f
util/assert: add optional message to assert, assume, and static_assert
Removed static_assert_nomsg, since static_assert's message argument is
optional now. In C2X mode this uses the native _Static_assert
functionality, otherwise it falls back to a macro-based overload.

Additionally, rewrote the assert macro so it correctly marks the failing
branch as a dead end.
2023-03-26 01:52:41 +01:00
Andrei Alexeyev
7c19322940
log: flush buffers after assert failure 2023-03-26 01:07:17 +01:00
Andrei Alexeyev
f73b1d6891
Abandon standard C conformance and require GNU extensions
Removed the use_gnu_ext option as well as fallback paths for compilers
that don't support GNU extensions. To my knowledge, none of those
compilers support C11 to a sufficient extent to compile Taisei anyway,
and those fallbacks are very poorly tested.

Pedantic warnings are now disabled, and extensions that are common to
reasonably recent versions of GCC and clang are permitted to be relied
on (list of allowed extensions TBA).
2021-08-31 23:33:16 +03:00
Andrei Alexeyev
14d5904985
fix various emscripten crap 2021-04-21 04:31:26 +03:00
Andrei Alexeyev
bb3a809117
Asynchronous logging (#260)
* Implement asynchronous logging

Put all log messages into a queue. A background thread will format and
dispatch the messages to loggers in a first-in-first-out fashion. This
is mostly useful for windows/wine, or in cases *very* spammy logging.
This adds some malloc overhead, however.

Can be disabled with TAISEI_LOG_ASYNC=0

* log: unfuck memory management

* log: add TAISEI_LOG_ASYNC_FAST_SHUTDOWN env variable

If true, don't wait for the logging queue to process every message
before shutting down.

* strbuf: fix off-by-one error

* log: sync queue before crashing on assertion failure

* docs/ENVIRON: update logging docs
2020-11-24 05:31:51 +02:00
Andrei Alexeyev
6834796262
emscripten compatibility fixes 2019-12-18 15:33:36 +02:00
Andrei Alexeyev
5a23fb95fc
make upkeep script preserve existing copyrights 2019-08-03 20:44:22 +03:00
Andrei Alexeyev
b61d1b3254
backport improved assertions from the lua branch 2019-08-03 19:57:02 +03:00
Andrei Alexeyev
3055901998
update my email 2019-07-03 21:00:56 +03:00
Andrei Alexeyev
4159ea1249
'upkeep' target for maintenance tasks; back to include guards; happy new year! 2019-01-23 22:10:43 +02:00
Andrei Alexeyev
2932247249
attempt to refactor the util disaster into several smaller disasters 2018-05-15 03:27:25 +03:00
Renamed from src/assert.c (Browse further)