Index: /trunk/source/lisp-kernel/thread_manager.c
===================================================================
--- /trunk/source/lisp-kernel/thread_manager.c	(revision 13454)
+++ /trunk/source/lisp-kernel/thread_manager.c	(revision 13455)
@@ -1610,17 +1610,4 @@
 count_cpus()
 {
-#ifdef DARWIN
-  /* As of OSX 10.4, Darwin doesn't define _SC_NPROCESSORS_ONLN */
-#include <mach/host_info.h>
-
-  struct host_basic_info info;
-  mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT;
-  
-  if (KERN_SUCCESS == host_info(mach_host_self(), HOST_BASIC_INFO,(host_info_t)(&info),&count)) {
-    if (info.max_cpus > 1) {
-      spin_lock_tries = 1024;
-    }
-  }
-#else
   int n = sysconf(_SC_NPROCESSORS_ONLN);
   
@@ -1628,5 +1615,4 @@
     spin_lock_tries = 1024;
   }
-#endif
 }
 #endif
@@ -1852,11 +1838,10 @@
 #else
 Boolean
-create_system_thread(size_t stack_size,
-		     void* stackaddr,
-		     void* (*start_routine)(void *),
-		     void* param)
+create_system_thread(size_t stack_size,  void *stackaddr,
+		     void *(*start_routine)(void *), void *param)
 {
   pthread_attr_t attr;
-  pthread_t returned_thread = (pthread_t) 0;
+  pthread_t returned_thread;
+  int err;
   TCR *current = get_tcr(true);
 
@@ -1871,9 +1856,5 @@
   if (stackaddr != NULL) {
     /* Size must have been specified.  Sort of makes sense ... */
-#ifdef DARWIN
-    Fatal("no pthread_attr_setsetstack. "," Which end of stack does address refer to?");
-#else
     pthread_attr_setstack(&attr, stackaddr, stack_size);
-#endif
   } else if (stack_size != DEFAULT_THREAD_STACK_SIZE) {
     pthread_attr_setstacksize(&attr,stack_size);
@@ -1892,8 +1873,8 @@
   */
   LOCK(lisp_global(TCR_AREA_LOCK),current);
-  pthread_create(&returned_thread, &attr, start_routine, param);
+  err = pthread_create(&returned_thread, &attr, start_routine, param);
   UNLOCK(lisp_global(TCR_AREA_LOCK),current);
   pthread_attr_destroy(&attr);
-  return (returned_thread != (pthread_t)0);
+  return (err == 0);
 }
 #endif
