Re: how atomic is the atomic set instruction?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


atomic_set doesn´t say anything about interrupts. So i assume interrupts are
on,
and context switch can occur. Between the load and store instruction.

On Sat, Nov 8, 2008 at 11:40 AM, Ian Molton <ian@xxxxxxxxxxxxxx> wrote:

> Ali Günhan Akyürek wrote:
>
> load r1,[memAddress1]
>> ----- > What if a context switch occurs here.
>> store r2,[memAddress2]
>>
>> The value you read from memAddress1 may change by another process or
>> thread.
>> So the stored value will be different than the expected. This is where i
>> am
>> stucked.
>>
>
> Context switches dont happen if interrupts are off.
>
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php


[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter