Efficient Race Condition Detection for Shared-Memory Programs with Post/Wait Synchronization