From mboxrd@z Thu Jan 1 00:00:00 1970 From: eag0628@gmail.com (Lai Jiangshan) Date: Tue, 22 Jan 2013 22:24:09 +0800 Subject: [lttng-dev] Query on the rculist In-Reply-To: <20130121141645.GB31140@Krystal> References: <50FCA183.8030201@gmail.com> <20130121141645.GB31140@Krystal> Message-ID: <50FEA109.6060404@gmail.com> ? 2013/1/21 22:16, Mathieu Desnoyers ??: > * Liu Yuan (namei.unix at gmail.com) wrote: >> Hi List, >> >> I noticed that there are just few functions suffixed with rcu for >> rculist. And from the source of Linux kernel rculist, I came up with >> some comments saying that list_empty_rcu() can be simply achieved by >> calling list_empty(). Is this true to urcu too? My questions is, are >> following equivalents true? >> >> list_empty_rcu -> list_empty > > Yes. > >> list_del_init_rcu -> list_del_init > > No. Add a trivial comment. There is no list_del_init_rcu(), "init" hurts "rcu". If you need a re-initialized object after deletion, you should use synchronzie_rcu(): list_del_rcu(); synchronize_rcu(); CDS_INIT_LIST_HEAD(); > >> >> If there are more equivalents, please show light on it. > > I will prepare a patch to extend and document the list and rculist APIs. > Your feedback is welcome. > > Thanks! > > Mathieu > >> >> Thanks, >> Yuan >