UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor dcabrera
Visitor
3,999 Views
Registered: ‎11-04-2010

microblaze gcc builtin atomic functions

Hello,

I want to compile a program using mb-gcc and I need to find replacements for this builtin functions in gcc :

 

__sync_lock_test_and_set

__sync_lock_release

__sync_synchronize

__sync_bool_compare_and_swap

Can anybody help me or give me a hint?

 

Thanks in advance

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
3,992 Views
Registered: ‎08-08-2007

Re: microblaze gcc builtin atomic functions

In the 12.3 version of the MicroBlaze User Guide, there is a section on Semaphore Synchronization.  Opcodes LWX and SWX have been added to MicroBlaze to handle this.

0 Kudos
Visitor dcabrera
Visitor
3,971 Views
Registered: ‎11-04-2010

Re: microblaze gcc builtin atomic functions

Thank you very much. I am going to check it now

0 Kudos
Participant giacomo87vett
Participant
1,111 Views
Registered: ‎12-27-2012

Re: microblaze gcc builtin atomic functions

Hello dcabrera,

could you please tell me how you found the replacement of the built-in functions that you listed? In particular, I would be interested to __sync_synchronize.

 

Thank you.

Giacomo

 

0 Kudos