init (int *data)
init (intptr_t *data)
init (int *data){  int argc = *data;  char **argv = (void *) (data + 1);  char **envp = &argv[argc + 1];  struct hurd_startup_data *d;  unsigned long int threadvars[_HURD_THREADVAR_MAX];  /* Provide temporary storage for thread-specific variables on the     startup stack so the cthreads initialization code can use them     for malloc et al, or so we can use malloc below for the real     threadvars array.  */  memset (threadvars, 0, sizeof threadvars);  __hurd_threadvar_stack_offset = (unsigned long int) threadvars;  /* Since the cthreads initialization code uses malloc, and the     malloc initialization code needs to get at the environment, make     sure we can find it.  We'll need to do this again later on since     switching stacks changes the location where the environment is     stored.  */  __environ = envp;  while (*envp)    ++envp;  d = (void *) ++envp;  /* The user might have defined a value for this, to get more variables.     Otherwise it will be zero on startup.  We must make sure it is set     properly before before cthreads initialization, so cthreads can know     how much space to leave for thread variables.  */  if (__hurd_threadvar_max < _HURD_THREADVAR_MAX)    __hurd_threadvar_max = _HURD_THREADVAR_MAX;  /* After possibly switching stacks, call `init1' (above) with the user     code as the return address, and the argument data immediately above     that on the stack.  */  if (_cthread_init_routine)    {      /* Initialize cthreads, which will allocate us a new stack to run on.  */      void *newsp = (*_cthread_init_routine) ();      struct hurd_startup_data *od;      void switch_stacks (void);      /* Copy per-thread variables from that temporary	 area onto the new cthread stack.  */      memcpy (__hurd_threadvar_location_from_sp (0, newsp),	      threadvars, sizeof threadvars);      /* Copy the argdata from the old stack to the new one.  */      newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data,		      (char *) d - (char *) data);#ifdef SHARED      /* And readjust the dynamic linker's idea of where the argument         vector lives.  */      assert (_dl_argv == argv);      _dl_argv = (void *) ((int *) newsp + 1);#endif      /* Set up the Hurd startup data block immediately following	 the argument and environment pointers on the new stack.  */      od = (newsp + ((char *) d - (char *) data));      if ((void *) argv[0] == d)	/* We were started up by the kernel with arguments on the stack.	   There is no Hurd startup data, so zero the block.  */	memset (od, 0, sizeof *od);      else	/* Copy the Hurd startup data block to the new stack.  */	*od = *d;      /*         Force NEWSP into sp and &init1 into pv, then branch to pv (call init1).       */      asm volatile ("lda $30,0(%0); lda $27,0(%1); jsr $26,($27)"		    : : "r" (newsp), "r" (&init1));    }  else    {      /* We are not using cthreads, so we will have just a single allocated	 area for the per-thread variables of the main user thread.  */      unsigned long int *array;      unsigned int i;      array = malloc (__hurd_threadvar_max * sizeof (unsigned long int));      if (array == NULL)	__libc_fatal ("Can't allocate single-threaded thread variables.");      /* Copy per-thread variables from the temporary array into the	 newly malloc'd space.  */      memcpy (array, threadvars, sizeof threadvars);      __hurd_threadvar_stack_offset = (unsigned long int) array;      for (i = _HURD_THREADVAR_MAX; i < __hurd_threadvar_max; ++i)	array[i] = 0;      init1 (data);    }}