rtems: Simplify rtems_semaphore_obtain()