Designing and Implementing Synchronization Primitives in Windows user-mode Applications