]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/net/init.c
xnu-3789.31.2.tar.gz
[apple/xnu.git] / bsd / net / init.c
index 0c2286f822bed9194d6d865468ab5360af5b1da1..85464da74d9263f439f51a4f080b243907c30d34 100644 (file)
@@ -73,8 +73,7 @@ net_init_add(
                        kfree(entry, sizeof(*entry));
                        return EALREADY;
                }
-       } while(!OSCompareAndSwap((UInt32)entry->next, (UInt32)entry,
-                                                         (UInt32*)&list_head));
+       } while(!OSCompareAndSwapPtr(entry->next, entry, &list_head));
        
        return 0;
 }
@@ -92,8 +91,7 @@ net_init_run(void)
         */
        do {
                backward_head = list_head;
-       } while (!OSCompareAndSwap((UInt32)backward_head, (UInt32)LIST_RAN,
-                                                          (UInt32*)&list_head));
+       } while (!OSCompareAndSwapPtr(backward_head, LIST_RAN, &list_head));
        
        /* Reverse the order of the list */
        while (backward_head != 0) {