Diego Nieto Cid, on Sun 06 Mar 2016 22:56:15 -0300, wrote:
> I had to add the first condition because otherwise a segmentation
> fault was triggered.

Ah, right.  The rest of the code does that too.  That's normal for an
undefined symbol.

> Finally, while this fixes the case where pthread is not present, there are
> still some issues when linking pthread in. For instance, if I launch gdb, add
> a breakpoint in '__libc_getspecific' and run the program until that point then
> the code I see using the list command is the one from the weak functions; as 
> if
> pthread were not overriding those symbols.

__libc_getspecific is not a weak symbol, keep it as it is, calling
cthread_getspecific.

Samuel

Reply via email to