maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   atomic variables on Maemo? (https://talk.maemo.org/showthread.php?t=74556)

vbar 2011-07-02 09:09

atomic variables on Maemo?
 
Hi,

I'd like to use gcc intrinsics for atomic memory access (__sync_lock_test_and_set etc.) in my application, but under scratchbox, a program with them doesn't link. Googling shows it's a known gcc problem, which

a) may be solved by using the correct -march switch - which would be the right value for Maemo? or

b) may not be solvable on ARM, since it (generally - not always) doesn't support the necessary atomic instructions.

So, did anybody need atomic variables on Maemo? How did you go about getting them?

Hurrian 2011-07-02 09:33

Re: atomic variables on Maemo?
 
The -march switch would be armv7-a (with the A standing for the A in Cortex-A8.

vbar 2011-07-02 13:20

Re: atomic variables on Maemo?
 
Quote:

Originally Posted by Hurrian (Post 1043244)
The -march switch would be armv7-a (with the A standing for the A in Cortex-A8.

Still the same problem:

undefined reference to `__sync_lock_test_and_set_4'

I guess the intrinsics really aren't supported...


All times are GMT. The time now is 16:40.

vBulletin® Version 3.8.8