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

From
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date
2021-09-29 20:13:16
Also in
linux-arch, lkml
Reply to
Mathieu Desnoyers, 2021-09-29
----- On Sep 29, 2021, at 3:50 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com 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
Thread (19 messages) 19 messages, 6 authors, last reply 2021-10-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help