basic timed mutex uses an Auto-Reset Event rather than a semaphore; changed thread_primitives to avoid use of macros