USync (Userspace Synchronization) is a userspace synchronization backend for Wine on macOS, developed by WineForge. It was previously named WFUSync.
USync keeps supported synchronization state in shared memory and uses atomic operations for fast acquisition. Native macOS wait/wake primitives put threads to sleep when needed. Operations that require Wine server handling retain that path.
Status: Testing release. This patch targets the WineForge integration of Wine 11.22. Runtime validation below was performed with WineForge 0.6.0.8 / Wine 11.21.
- Events: auto-reset and manual-reset, named objects, wait, set, reset, pulse and query.
- Semaphores: named objects, wait and release. Queries use the Wine server.
- Mutexes: named and unnamed objects, wait, release, query, recursion and abandonment.
- WaitAny: supported Event, Semaphore and Mutex combinations.
- WaitAll: atomic acquisition for supported auto-reset Event, Semaphore and Mutex combinations. Manual-reset, contended and unsupported cases use server-assisted handling.
- macOS integration: shared memory,
os_sync_wait_on_address/os_sync_wake_by_address, with__ulock_wait/__ulock_wakefallback.
- Fewer unnecessary macOS wake calls on warmed, uncontended Event, Semaphore and Mutex operations, with coordinated waiter registration and a final check before sleeping.
- Checked shared-memory sizing and allocation, with safe reuse of object and thread slots.
- Improved PulseEvent completion for direct waiters and fixes for invalid caller outputs that release internal locks before accessing caller memory.
- Signed Semaphore release validation and fixes for the reproduced APC interruption and interrupted-wake races.
Patch: USync v6.
Enable USync when launching an application:
WINEUSYNC=1 wine /path/to/application.exeDisable it by unsetting WINEUSYNC or setting it to 0. When migrating from WFUSync, replace WINEWFUSYNC with WINEUSYNC. The old variable no longer enables the backend.
Focused regression and concurrency tests cover waiter registration, multiple waiters, timeouts, cross-process synchronization, object and thread slot reuse, PulseEvent, invalid caller outputs and APC interruptions. Activation tests verify direct waits when USync is enabled and Wine server waits when it is disabled.
Wine runtime testing used x86_64 under Rosetta on macOS 27.0. Native ARM component checks also passed, but native ARM, FEX and ARM64EC Wine runtimes have not been validated.
The Wine 11.22 patch passed source comparison and full patch-queue application/reversal checks. It has not yet been built or runtime-tested.
The USync v6 results are medians from five runs per scenario measured on November 12, 2026, with 1,000,000 iterations per scenario. WFUSync v5 and CrossOver MSync retain the original README measurements. Those historical results were not remeasured alongside v6.
All values are milliseconds per operation (ms/op). Lower is better. One operation is a complete loop iteration, such as SetEvent followed by a wait.
| Scenario | WFUSync v5 | USync v6 | CrossOver MSync |
|---|---|---|---|
| Auto Event set/wait | 0.000581 ms/op | 0.000066967 ms/op | 0.000666 ms/op |
| Semaphore release/wait | 0.000597 ms/op | 0.000103765 ms/op | 0.000683 ms/op |
| Mutex wait/release | 0.000625 ms/op | 0.000108299 ms/op | 0.000686 ms/op |
| WaitAny auto Events | 0.000627 ms/op | 0.000115838 ms/op | 0.000704 ms/op |
| WaitAll auto Events | 0.001186 ms/op | 0.000170895 ms/op | 0.001291 ms/op |
| WaitAll Event + Semaphore | 0.001183 ms/op | 0.000176800 ms/op | 0.001288 ms/op |
| WaitAll Event + Mutex | 0.001192 ms/op | 0.000178009 ms/op | 0.001294 ms/op |
These measurements belong to the corrected v6 implementation before the technical rename to USync. The renamed Wine 11.21 binaries were functionally verified on November 14 and were not benchmarked again. These figures are not measurements of the Wine 11.22 port.
These warmed, uncontended loops do not measure blocked-thread handoff or game FPS. Controlled game A/B measurements are still pending.