]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/sync_sema.c
xnu-3789.1.32.tar.gz
[apple/xnu.git] / osfmk / kern / sync_sema.c
index 4304559e67d3011188330dbf871c73447c58857a..fc09bb646998899a523dd129c31f0b85802d4779 100644 (file)
@@ -687,7 +687,6 @@ semaphore_wait_internal(
                thread_t        self = current_thread();
 
                wait_semaphore->count = -1;  /* we don't keep an actual count */
-               thread_lock(self);
                (void)waitq_assert_wait64_locked(
                                        &wait_semaphore->waitq,
                                        SEMAPHORE_EVENT,
@@ -695,7 +694,6 @@ semaphore_wait_internal(
                                        TIMEOUT_URGENCY_USER_NORMAL,
                                        deadline, TIMEOUT_NO_LEEWAY,
                                        self);
-               thread_unlock(self);
        }
        semaphore_unlock(wait_semaphore);
        splx(spl_level);