lkml.org 
[lkml]   [2021]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] LKMM: Add ctrl_dep() macro for control dependency
----- 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

\
 
 \ /
  Last update: 2021-09-29 22:13    [W:0.049 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site