]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ipc/ipc_space.c
xnu-344.tar.gz
[apple/xnu.git] / osfmk / ipc / ipc_space.c
index c5b207a224b31a880576c050a2593b59ed131725..b51b029992f3d476dfaa5ce0fed89caa4a8368a6 100644 (file)
@@ -233,12 +233,8 @@ ipc_space_clean(
         *      out the space died.
         */
        is_write_lock(space);
-       while (space->is_growing) {
-               assert_wait((event_t) space, THREAD_UNINT);
-               is_write_unlock(space);
-               thread_block((void (*)(void)) 0);
-               is_write_lock(space);
-       }
+       while (space->is_growing)
+               is_write_sleep(space);
 
        /*
         *      Now we can futz with it since we have the write lock.
@@ -328,12 +324,8 @@ ipc_space_destroy(
         *      out the space died.
         */
        is_read_lock(space);
-       while (space->is_growing) {
-               assert_wait((event_t) space, THREAD_UNINT);
-               is_read_unlock(space);
-               thread_block((void (*)(void)) 0);
-               is_read_lock(space);
-       }
+       while (space->is_growing)
+               is_read_sleep(space);
 
        is_read_unlock(space);
        /*