Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2006 18:19:23 +0200
From:      Csaba Henk <csaba-ml@creo.hu>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: switching threading libraries
Message-ID:  <20060410161923.GE1323@beastie.creo.hu>
In-Reply-To: <Pine.GSO.4.64.0604071727560.20876@sea.ntplx.net>
References:  <slrne3ck4t.18h.csaba@beastie.creo.hu> <Pine.GSO.4.43.0604070910310.15406-100000@sea.ntplx.net> <20060407140809.GZ1323@beastie.creo.hu> <Pine.GSO.4.64.0604071727560.20876@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 07, 2006 at 05:28:41PM -0400, Daniel Eischen wrote:
> Does this work for you:
> 
>   http://people.freebsd.org/~deischen/symver/libc_r.symver.diffs
> 
> ?

Not really:

%cat phello.c

#include <pthread.h>
#include <stdio.h>
#define NUM_THREADS     5

void *PrintHello(void *threadid)
{
   printf("\n%d: Hello World!\n", threadid);
   pthread_exit(NULL);
}

int main (int argc, char *argv[])
{
   pthread_t threads[NUM_THREADS];
   int rc, t;
   for(t=0; t<NUM_THREADS; t++){
      printf("Creating thread %d\n", t);
      rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t);
      if (rc){
         printf("ERROR; return code from pthread_create() is %d\n", rc);
         exit(-1);
      }
   }
   pthread_exit(NULL);
}
%gcc -o phello phello.c -pthread
%env LD_LIBMAP=libpthread.so.2=libc_r.so ./phello

Fatal error 'Thread jump table not properly initialized' at line 252 in file /usr/src/lib/libc_r/uthread/uthread_init.c (errno = 0)
Fatal error 'Thread jump table not properly initialized' at line 252 in file /usr/src/lib/libc_r/uthread/uthread_init.c (errno = 0)
Fatal error 'Thread jump table not properly initialized' at line 252 in file /usr/src/lib/libc_r/uthread/uthread_init.c (errno = 0)
Fatal error 'Thread jump table not properly initialized' at line 252 in file /usr/src/lib/libc_r/uthread/uthread_init.c (errno = 0)
Fatal error 'Thread jump table not properly initialized' at line 252 in file /usr/src/lib/libc_r/uthread/uthread_init.c (errno = 0)
[and so on...]

Regards,
Csaba



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060410161923.GE1323>