Skip to contentSkip to conversation

Semaphores in eldk4.1

DISCUSSION Stuart Hodgson 3 participants 3 messages Nov 30, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

I have been suing the eldk4.1 tool chain for a few months now and have not not encountered any problems with building until now. I build for two slightly different archs, ppc_85xx and ppx_82xx.

The problem I have come up against is related to some of the semaphore functions in semaphore.h, namely sem_wait, sem_post. This was originally noticed in a third party driver I am porting from one board to another but a small test program has shown the same results.

Calls to these functions on the ppc_82xx platform return -1 with an error code of 38, in this case meaning ENOSYS (not implemented). On the ppc_85xx the same program executes fine, thus I conclude that it is specific to the libc-2.3.5 for ppc_82xx. Has anyone else come across this problem, I did find one thread but there was no conclusion listed.

I also can not find anything stating that these functions are not implemented for the 82xx arch compared with others for the eldk4.1

Thanks

Stuart

#1 lore raw

HI Stuart,

Quoted 9 lines · Stuart Hodgson

Hi,

I have been suing the eldk4.1 tool chain for a few months now and have not not encountered any problems with building until now. I build for two slightly different archs, ppc_85xx and ppx_82xx.

The problem I have come up against is related to some of the semaphore functions in semaphore.h, namely sem_wait, sem_post. This was originally noticed in a third party driver I am porting from one board to another but a small test program has shown the same results.

Calls to these functions on the ppc_82xx platform return -1 with an error code of 38, in this case meaning ENOSYS (not implemented). On the ppc_85xx the same program executes fine, thus I conclude that it is specific to the libc-2.3.5 for ppc_82xx. Has anyone else come across this problem, I did find one thread but there was no conclusion listed.

These work fine for me with ppc_6xx architecture and ELDK 4.1, although they didn't with ELDK 4.0. In that case, I was getting ENOSYS on sem_open() and sem_init(). Do these functions return 0 for you? I assume you're using a kernel that supports POSIX semaphores (I think that started at 2.6.12) and that you're using the glibc version of ELDK and not ulibc.

Quoted 11 lines

I also can not find anything stating that these functions are not implemented for the 82xx arch compared with others for the eldk4.1

Thanks

Stuart
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

regards,
Ben

#2 lore raw
In reply to Stuart Hodgson
Quoted 2 lines · In message <[email protected]> you wrote:

I have been suing the eldk4.1 tool chain for a few months now and have

Please post ELDK related questions on the ELDK mailing list instead, see http://lists.denx.de/mailman/listinfo/eldk

Quoted 3 lines

The problem I have come up against is related to some of the semaphore functions in semaphore.h, namely sem_wait, sem_post. This was originally noticed in a third party driver I am porting from one board to another

--------------------------^^^^^^^^

Quoted 1 line

but a small test program has shown the same results.

What exactly are you talking about? Device driver (i. e. kernel) code, or application (i. e. user space) code ?

Quoted 2 lines

Calls to these functions on the ppc_82xx platform return -1 with an error code of 38, in this case meaning ENOSYS (not implemented). On the

Did you enable the CONFIG_SYSVIPC option in your Linux kernel configuration?

Quoted 3 lines

ppc_85xx the same program executes fine, thus I conclude that it is specific to the libc-2.3.5 for ppc_82xx. Has anyone else come across this problem, I did find one thread but there was no conclusion listed.

There is absolutley no difference between ppc_85xx and ppc_82xx as far as library sources or configuration are concerned. The problem is most probably in your Linux kernel, I guess.

Quoted 2 lines

I also can not find anything stating that these functions are not implemented for the 82xx arch compared with others for the eldk4.1

Provide a test program that fails for yuou, and we can provide much better comments.

But please post followups on the ELDK mailing list.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Old programmers never die, they just become managers.