Zebediah Figura (@zfigura) commented about dlls/ntdll/sync.c:
- NOTES
- Unlike RtlAcquireResourceExclusive this function doesn't allow
- nested calls from the same thread. "Upgrading" a shared access lock
- to an exclusive access lock also doesn't seem to be supported.
- */
-void WINAPI RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock ) +/* Transfer the ownership of the lock to the waiters at the front of the list,
- remove them from the list, and wake them up. Only one thread can call this
- function at any given time. */
+static void srwlock_transfer_ownership(RTL_SRWLOCK *lock) {
- union { RTL_SRWLOCK *rtl; struct srw_lock *s; LONG *l; } u = { lock };
- RTL_SRWLOCK old, new, read;
- USHORT tag;
- struct srwlock_waiter *last, *head, *last_up_to_date, *last_to_remove,
*new_head;
Let's just let this line flow past 80 characters. There are some other cases in this patch that feel similarly awkward; in general we don't stick fast to 80 characters, at least in ntdll, and having the occasional line that's 90-100 characters feels better to me than wrapping like this.