Posix Threads, pthreads?

Ralf Corsepius corsepiu at faw.uni-ulm.de
Sat Feb 21 09:50:22 UTC 2004


On Sat, 2004-02-21 at 10:18, sashti srinivasan wrote:
> Hello,
>    Thanks a lot.  I could run this example on both
> linux and rtems both. I built rtems with
> --enable-posix option, still if I do grep in
> $(install)/$(bsp)/lib, none of the libraries contain
> pthread_create.

In RTEMS, pthread support is part of librtemscpu.a.

>   If I use this and run the makefile
> that is provided here for guidance, still I get the
> error complaining "undefined reference to
> pthread_create". 

>  My target platform is linux.  i.e.,
> I built rtems without --target option.
That's the problem: RTEMS's pthreads are supported for embedded targets
only, but not with the unix/posix BSP.

>     I could get away this option with an additional
> -lpthread switch in linkflags.  I doubt that it will
> be using host's pthread-library in this case.
Yes. -lpthread will pickup the linux-pthreads. This will not work with
RTEMS's unix/posix.

ATM, there is no way to use RTEMS pthreads with target linux.

Ralf






More information about the users mailing list