Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2022-11-25 | Explicitly ignore posix_fadvise() return value | David Robillard | 1 | -2/+2 | |
If some error happened here, there's nothing we can do but proceed and try to copy anyway. | |||||
2022-11-25 | Consistently pass stat structs by pointer | David Robillard | 1 | -8/+10 | |
These are usually quite large, over 128 bytes. | |||||
2022-11-25 | Fix potential out of bounds read | David Robillard | 1 | -1/+1 | |
2022-11-17 | Remove ZixBitset | David Robillard | 1 | -107/+0 | |
2022-11-15 | Fix unused return value warning | David Robillard | 1 | -2/+3 | |
2022-11-13 | Trim special parsing prefixes from canonical Windows paths | David Robillard | 1 | -0/+5 | |
There doesn't seem to be any way to cleanly avoid getting these from GetFinalPathNameByHandle, but I don't think portable code would ever want them introduced. | |||||
2022-11-12 | Fix zix_current_path() on systems with a static PATH_MAX | David Robillard | 1 | -1/+2 | |
2022-11-02 | Remove function_types.h | David Robillard | 2 | -46/+45 | |
2022-11-02 | Add missing include | David Robillard | 1 | -0/+1 | |
2022-11-01 | Add missing pure and const function attributes | David Robillard | 2 | -0/+7 | |
It seems that certain versions and/or configurations of gcc warn about these for static functions, which is annoying, but whatever. | |||||
2022-10-23 | Add filesystem API | David Robillard | 10 | -1/+1155 | |
2022-10-23 | Add path API | David Robillard | 3 | -0/+771 | |
2022-10-23 | Add string view API | David Robillard | 1 | -0/+18 | |
2022-10-23 | Split up platform sources | David Robillard | 6 | -242/+250 | |
This puts more onus on the build system to do things properly, but it's still easy enough to build, even manually: all the files in the appropriate system subdirectory just need to be included in the build. Otherwise, the several nested levels of preprocessor conditionals get confusing, and clang-format doesn't format code properly. | |||||
2022-10-21 | Split up common header | David Robillard | 8 | -35/+36 | |
2022-10-21 | Hide errno utility functions | David Robillard | 7 | -43/+80 | |
2022-10-20 | Hide thread implementation | David Robillard | 1 | -0/+59 | |
2022-10-18 | Add missing pure function attribute | David Robillard | 1 | -0/+1 | |
2022-10-18 | Fix unused return value warning | David Robillard | 1 | -3/+1 | |
Kind of annoying since this adds an untested branch, but oh well. | |||||
2022-10-18 | Use 0BSD for trivial "public domain intent" things | David Robillard | 1 | -1/+1 | |
2022-10-14 | Simplify clang-tidy configuration | David Robillard | 1 | -8/+1 | |
2022-10-14 | Fix fallback configuration on older MacOS versions | David Robillard | 1 | -1/+1 | |
2022-10-14 | Fix zix_sem_timed_wait() interval calculation | David Robillard | 1 | -0/+9 | |
2022-10-09 | Fix off-by-one error in assertion | David Robillard | 1 | -1/+1 | |
2022-09-02 | Improve test coverage | David Robillard | 2 | -5/+6 | |
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 | 2 | -7/+12 | |
2022-09-01 | Simplify thread and semaphore status codes | David Robillard | 2 | -4/+9 | |
2022-08-19 | Avoid mixing signed and unsigned integers | David Robillard | 6 | -9/+9 | |
2022-08-19 | Simplify errno handling | David Robillard | 2 | -15/+12 | |
2022-08-19 | Move sem implementation out of header | David Robillard | 3 | -0/+238 | |
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 | 1 | -4/+5 | |
2022-08-18 | Fix semaphore error handling | David Robillard | 1 | -0/+4 | |
Note that existing code which uses zix_sem_try_wait() may still compile against this change, but be incorrect! | |||||
2022-08-18 | Factor out converting errno codes to ZixStatus | David Robillard | 1 | -0/+31 | |
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 | Make all ring parameters const | David Robillard | 1 | -18/+22 | |
2022-08-18 | Add transactional ring API | David Robillard | 1 | -5/+39 | |
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-07-13 | Suppress new warnings in clang and clang-tidy 14 | David Robillard | 1 | -0/+1 | |
2022-06-28 | Move zix_strerror to library | David Robillard | 1 | -0/+28 | |
2022-06-28 | Use uppercase integer literal suffixes | David Robillard | 6 | -113/+112 | |
I give in. | |||||
2022-06-28 | Simplify dep5 file by adding license headers where possible | David Robillard | 1 | -0/+3 | |
2022-06-28 | Clean up build configuration | David Robillard | 4 | -17/+43 | |
2022-02-02 | Avoid fallthrough annotation on older GCC versions | David Robillard | 1 | -1/+1 | |