Re: semaphore error that is due to TLS symbol error ?? (143 Views)
Reply
Occasional Advisor
Ma_Ta
Posts: 9
Registered: ‎12-15-2004
Message 1 of 2 (143 Views)

semaphore error that is due to TLS symbol error ??

[ Edited ]

Hello.

as soon as the application I made run,
it causes error and being terminated as bellow.

$ myapp&
[1] 26360
$ /usr/lib/dld.sl: Thread Local Storage mismatch symbol for: sem_destroy
/usr/lib/dld.sl: No such file or directory

I'm sure I use semaphore functions:
sem_init(),sem_wait(),sem_post() and sem_destroy().

And the program is a deamon application
and uses pthread functions and
precompiled by Pro*C for using Oracle.

I can't understand what the above error message does mean,
but it is possible there are some keywords or linker setting missed.
(but I use -lrt option to cc.)

If you know thare are some possibilities about this problem, please tell me.

regards,
Takanobu Maekawa

 

 

 

Moved from HP-UX Technical Documentation to HP-UX > languages

Occasional Advisor
Ma_Ta
Posts: 9
Registered: ‎12-15-2004
Message 2 of 2 (143 Views)

Re: semaphore error that is due to TLS symbol error ??

well,
I remembered I used a user-defined TLS valiable.
So I commented it out, the problem didn't happen.

Therefore, it is much possible to misuse TLS.
But althouth I read the TLS section in pthread(3T)in man page,
I can't find where I was wrong.

Simply I use TLS global valiable in a file as bellow,

__thread ERRSTRUCT errSt;
(ERRSTRUCT is a user-defined struct type)

If you know the right way to use TLS,
please tell me.I'm really confused...

regards,

Takanobu Maekawa
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.