Re: [RFC PATCH] LKMM: Add ctrl_dep() macro for control dependency

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

 



----- On Sep 29, 2021, at 3:50 PM, Mathieu Desnoyers mathieu.desnoyers@xxxxxxxxxxxx wrote:

[...]

> void fct(void)
> {
>    int x;
> 
>    if (refcount_dec_and_test()) {
>        var1 = 0;

in this example, this should be "var1 = 1;", so both legs are similar,
otherwise we end up with a dependency on the load.

Thanks,

Mathieu

>        return;
>    }
>    __smp_rmb();
>    var1 = 1;
> }
-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux