Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2022-10-09 | Fix off-by-one error in assertion | David Robillard | 1 | -1/+1 | |
2022-10-07 | Override pkg-config dependency within meson | David Robillard | 1 | -0/+3 | |
2022-09-08 | Only run autoship and reuse tests in strict mode | David Robillard | 2 | -16/+22 | |
2022-09-02 | Improve test coverage | David Robillard | 3 | -5/+7 | |
2022-09-02 | Improve zix_ring_mlock() return status | David Robillard | 1 | -11/+16 | |
2022-09-02 | Factor out POSIX-style return pattern | David Robillard | 3 | -7/+17 | |
2022-09-01 | Make glib a system dependency | David Robillard | 1 | -1/+2 | |
This avoids warnings from some compilers, and clang-tidy. | |||||
2022-09-01 | Remove redundant thread dependency | David Robillard | 1 | -1/+0 | |
2022-09-01 | Simplify thread and semaphore status codes | David Robillard | 7 | -11/+18 | |
2022-08-22 | Make COPYING a regular text file and link to it in LICENSES | David Robillard | 2 | -14/+14 | |
This just happens to be the way that both `licensee` (and therefore Github) and `reuse` handle correctly. | |||||
2022-08-22 | Use standard ISC license text | David Robillard | 1 | -7/+7 | |
I'm not sure where the disclaimer variant that starts with "THIS" came from (although it is better that way), but this one that starts with "THE" is the standard text which is recognized by tools like `licensee` (and therefore Github) as a perfect match. There are no other changes other than whitespace. | |||||
2022-08-19 | Avoid unused parameter warning | David Robillard | 1 | -0/+1 | |
2022-08-19 | Avoid mixing signed and unsigned integers | David Robillard | 6 | -9/+9 | |
2022-08-19 | Simplify errno handling | David Robillard | 4 | -23/+21 | |
2022-08-19 | Move sem implementation out of header | David Robillard | 7 | -186/+284 | |
This avoids having platform conditionals in public headers, which causes build problems for dependants. | |||||
2022-08-18 | Add return status to zix_ring_mlock() | David Robillard | 2 | -5/+6 | |
2022-08-18 | Relax test timing | David Robillard | 1 | -1/+1 | |
2022-08-18 | Fix conversion warning on 32-bit ARM | David Robillard | 1 | -2/+2 | |
2022-08-18 | Add zix_sem_timed_wait() | David Robillard | 3 | -2/+81 | |
2022-08-18 | Fix semaphore error handling | David Robillard | 7 | -43/+96 | |
Note that existing code which uses zix_sem_try_wait() may still compile against this change, but be incorrect! | |||||
2022-08-18 | Fix thread function attributes on Windows | David Robillard | 4 | -13/+7 | |
2022-08-18 | Reduce tree test complexity | David Robillard | 1 | -104/+77 | |
2022-08-18 | Improve test coverage | David Robillard | 3 | -10/+99 | |
2022-08-18 | Fix or remove non-portable features in thread API | David Robillard | 6 | -30/+98 | |
Thread function return values are inconsistent between nearly every threading API out there. So, just ignore them entirely, and provide a typedef and sentinel value so user code can be portable. | |||||
2022-08-18 | Factor out converting errno codes to ZixStatus | David Robillard | 5 | -14/+69 | |
2022-08-18 | Reduce zix_tree_insert() complexity | David Robillard | 1 | -12/+6 | |
2022-08-18 | Reduce variable scope and mutability | David Robillard | 1 | -7/+6 | |
2022-08-18 | Remove debug printing from tree | David Robillard | 2 | -62/+6 | |
2022-08-18 | Handle trees with no destroy callback more gracefully | David Robillard | 1 | -10/+11 | |
2022-08-18 | Use conventional test executable names | David Robillard | 10 | -10/+14 | |
2022-08-18 | Fix test coverage on CI | David Robillard | 1 | -0/+1 | |
2022-08-18 | Replace duplicated license with a symbolic link | David Robillard | 2 | -14/+2 | |
2022-08-18 | Add release metadata test | David Robillard | 2 | -1/+12 | |
2022-08-18 | Add NEWS file | David Robillard | 1 | -0/+5 | |
2022-08-18 | Sort meson option definitions | David Robillard | 1 | -3/+3 | |
2022-08-18 | Clean up Python scripts | David Robillard | 4 | -74/+108 | |
2022-08-18 | Make all ring parameters const | David Robillard | 1 | -18/+22 | |
2022-08-18 | Add transactional ring API | David Robillard | 3 | -6/+113 | |
2022-08-12 | Run TSan and MSan on CI | David Robillard | 1 | -3/+6 | |
2022-08-12 | Fix ring thread safety | David Robillard | 1 | -25/+53 | |
The previous code was "probably fine" in practice, but was both missing some necessary synchronization, and using unnecessarily heavyweight barriers on Windows. Since this code conveniently has a 1:1 relationship between barriers and atomic accesses anyway, rewrite things to use an "atomic" interface closer to standard C11 and C++11. Harden things in the process, so that the thread-safety guarantees are followed, and hopefully clearer to see in the code (1 synchronized read of "their" index, then maybe 1 synchronized write of "your" index). Windows/MSVC annoyingly does not provide a suitable C API for this, so just ignore the existence of Windows on ARM and use x86/x64 Windows intrinsics to prevent compiler reordering (which is all that's required on those architectures). Note that MSVC can make some reordering guarantees about volatile variables, but: * Only with a certain option, /volatile:ms, which Microsoft "strongly recommend" against using. It is disabled by default (and painfully slow if enabled) on ARM. * This guarantee does not prevent reordering of access to other memory (only the volatile variables themselves), which is required by a ring buffer. So, deal with that case by using explicit read and write barriers like before, but only in the atomic abstractions. In the process, switch to more lightweight barriers, which should marginally improve performance on Windows. When MSVC adds stdatomic.h support, most of the platform-specific gunk here can go away entirely. | |||||
2022-08-12 | Simplify ring writing code | David Robillard | 1 | -6/+8 | |
The compiler is surely smart enough to factor out these common expressions, but I find this easier to read this way anyway. | |||||
2022-08-12 | Use a consistent error handling style | David Robillard | 1 | -6/+5 | |
2022-08-12 | Simplify ring space calculations | David Robillard | 1 | -14/+2 | |
It isn't necessary to branch here to avoid underflow. Essentially, the way that unsigned binary integers work "automatically" does what this code was doing. Note that these expressions only work for a ring buffer that, like this one, has a power of 2 (real) size and a maximum capacity 1 less than that. | |||||
2022-08-12 | Document the thread semantics of every ring function | David Robillard | 1 | -15/+42 | |
2022-08-12 | Use sensible meson setup commands in CI configuration | David Robillard | 1 | -18/+18 | |
2022-07-18 | Use consistent pkg-config description | David Robillard | 1 | -1/+1 | |
2022-07-15 | Pass suppression flags explicitly | David Robillard | 1 | -5/+4 | |
2022-07-15 | Fix shared library build | David Robillard | 1 | -0/+1 | |
2022-07-14 | Simplify linking against static libraries | David Robillard | 1 | -3/+5 | |
2022-07-14 | Clean up meson definitions | David Robillard | 1 | -29/+45 | |