Change semaphore attributes to resolve problem where semaphore is not released upon a context switch.