Re: Possible bug; latest kernels with LinuxThreads

Davide Libenzi (davidel@xmailserver.org)
Sat, 17 Nov 2001 18:36:27 -0800 (PST)


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/