Re: Possible bug; latest kernels with LinuxThreads

From: Davide Libenzi (davidel@xmailserver.org)
Date: Sat Nov 17 2001 - 21:36:27 EST


On Sun, 18 Nov 2001, David Sanchez wrote:

> #0 0x40053f0f in __pthread_create_2_1 (thread=0x40244fc4, attr=0x40244fc8,
> start_routine=0x804ae20 <gMantThread(void *)>, arg=0x40244fc4) at pthread.c:488

In that case a look at the code always helps :

int __pthread_create_2_1(pthread_t *thread, const pthread_attr_t *attr,
             void * (*start_routine)(void *), void *arg)
{
  pthread_descr self = thread_self();
  struct pthread_request request;
  if (__pthread_manager_request < 0) {
    if (__pthread_initialize_manager() < 0) return EAGAIN;
  }
  request.req_thread = self;
  request.req_kind = REQ_CREATE;
  request.req_args.create.attr = attr;
  request.req_args.create.fn = start_routine;
  request.req_args.create.arg = arg;
  sigprocmask(SIG_SETMASK, (const sigset_t *) NULL,
              &request.req_args.create.mask);
  __libc_write(__pthread_manager_request, (char *) &request,
        sizeof(request));
  suspend(self);
  if (THREAD_GETMEM(self, p_retcode) == 0)

>>>> *thread = (pthread_t) THREAD_GETMEM(self, p_retval);

  return THREAD_GETMEM(self, p_retcode);
}

The line marked >>>> is line 488 in pthread.c , are you plain sure that
you're not passing a NULL thread id ptr ?

- Davide

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:17 EST