| Commit message (Expand) | Author | Age | Files | Lines |
| * | Setup stub unit test infrastructure | EuAndreh | 2024-01-05 | 10 | -0/+80 |
| * | mq_notify: block all (application) signals in the worker thread•••until the mq notification event arrives, it is mandatory that signals
be blocked. otherwise, a signal can be received, and its handler
executed, in a thread which does not yet exist on the abstract
machine.
after the point of the event arriving, having signals blocked is not a
conformance requirement but a QoI requirement. while the application
can unblock any signals it wants unblocked in the event handler
thread, if they did not start out blocked, it could not block them
without a race window where they are momentarily unblocked, and this
would preclude controlled delivery or other forms of acceptance
(sigwait, etc.) anywhere in the application.
| Rich Felker | 2023-02-12 | 1 | -0/+5 |
| * | mq_notify: join worker thread before returning in error path•••this avoids leaving behind transient resource consumption whose
cleanup is subject to scheduling behavior.
| Rich Felker | 2023-02-12 | 1 | -2/+5 |
| * | mq_notify: rework to fix use-after-close/double-close bugs•••in the error path where the mq_notify syscall fails, the initiating
thread may have closed the socket before the worker thread calls recv
on it. even in the absence of such a race, if the recv call failed,
e.g. due to seccomp policy blocking it, the worker thread could
proceed to close, producing a double-close condition.
this can all be simplified by moving the mq_notify syscall into the
new thread, so that the error case does not require pthread_cancel.
now, the initiating thread only needs to read back the error status
after waiting for the worker thread to consume its arguments.
| Rich Felker | 2023-02-12 | 1 | -8/+15 |
| * | mq_notify: use semaphore instead of barrier to sync args consumption•••semaphores are a much lighter primitive, and more idiomatic with
current usage in the code base.
| Rich Felker | 2023-02-11 | 1 | -5/+9 |
| * | mq_timedsend, mq_timedreceive: add time64, decouple 32-bit time_t•••time64 syscall is used only if it's the only one defined for the arch,
or if the requested absolute timeout does not fit in 32 bits. on
current 32-bit archs where time_t is a 32-bit type, this makes it
statically unreachable.
on 64-bit archs, there is no change to the code after preprocessing.
on current 32-bit archs, the timeout is passed via an intermediate
copy to remove the assumption that time_t is a 32-bit type.
| Rich Felker | 2019-07-28 | 2 | -0/+34 |
| * | use restrict everywhere it's required by c99 and/or posix 2008•••to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
| Rich Felker | 2012-09-06 | 2 | -2/+2 |
| * | fix longstanding missing static in mq_notify (namespace pollution) | Rich Felker | 2012-04-29 | 1 | -1/+1 |
| * | const correctness in mq_notify•••why did gcc allow this invalid assignment to compile in the first place?
| Rich Felker | 2011-06-25 | 1 | -1/+1 |
| * | mq names without leading / have impl-def behavior; allowing them is easier | Rich Felker | 2011-06-07 | 2 | -9/+2 |
| * | mq send/recv functions are cancellation points | Rich Felker | 2011-06-07 | 2 | -2/+2 |
| * | implement mq_notify | Rich Felker | 2011-06-07 | 1 | -2/+65 |
| * | add support for POSIX message queues, except mq_notify | Rich Felker | 2011-06-07 | 10 | -0/+99 |