On 10/28/2013 10:44 AM, Jan Jaap Kempenaar wrote:
> Hello,
>
> For our projects we developed a multiplatform library which is used
> to create our applications. We are now porting this to Xenomai.
> Because we compile for embedded targets, in this case an ARM board,
> we use static linking as it might occur that dynamic libraries are
> not available.
>
> In one of our test cases we compile a global class containing a
> mutex. This class gets initiated before the main function.
Whether this works depends on initialization order: the Xenomai library
has to be initialized before you call pthread_mutex_init, and this is
probably not true when you link the library statically. The only
solution is to defer the call to pthread_mutex_init somehow.
Also note that in order to static link the Xenomai library, you have to
use the "wrap-link.sh" script.
--
Gilles.
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai