Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
memory barrier
Jump...
Cancel
Locked
Locked
Replies
4 replies
Subscribers
119 subscribers
Views
3395 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
memory barrier
mosfet mosfet
over 12 years ago
Note: This was originally posted on 18th January 2010 at
http://forums.arm.com
Hi,
On x86/win architecture there is a function called MemoryBarrier that prevents the CPU from re-ordering read/write operations.
Is there something like that on arm architecture ?
// x86
FORCEINLINE VOID
MemoryBarrier (VOID)
{
LONG Barrier;
__asm {
xchg Barrier, eax
}
}
Parents
guestposter guestposter
over 12 years ago
Note: This was originally posted on 20th January 2010 at
http://forums.arm.com
On some ARM processors there are multiple bus interfaces, for example, ARM1136 have separated read and write data bus. From my understanding, SWP and SWPB can only ensure the read and write transfers are atomic, but it does not imply a barrier behavior ( it might be true in some ARM processors but it is not a necessary requirement).
In newer ARM processors semaphores operations can be handled by exclusive accesses (LDREX, STREX, etc). These instructions can work together with barrier instructions to ensure safe memory ordering in semaphores.
Cancel
Vote up
0
Vote down
Cancel
Reply
guestposter guestposter
over 12 years ago
Note: This was originally posted on 20th January 2010 at
http://forums.arm.com
On some ARM processors there are multiple bus interfaces, for example, ARM1136 have separated read and write data bus. From my understanding, SWP and SWPB can only ensure the read and write transfers are atomic, but it does not imply a barrier behavior ( it might be true in some ARM processors but it is not a necessary requirement).
In newer ARM processors semaphores operations can be handled by exclusive accesses (LDREX, STREX, etc). These instructions can work together with barrier instructions to ensure safe memory ordering in semaphores.
Cancel
Vote up
0
Vote down
Cancel
Children
No data