lkml.org 
[lkml]   [2019]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH v5 1/3] printk-rb: new printk ringbuffer implementation (writer)
Date
On 2019-12-09, Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> wrote:
>> +#define _DATA_SIZE(sz_bits) (1UL << (sz_bits))
>> +#define _DESCS_COUNT(ct_bits) (1U << (ct_bits))
>> +#define DESC_SV_BITS (sizeof(int) * 8)
>> +#define DESC_COMMITTED_MASK (1U << (DESC_SV_BITS - 1))
>
> What does SV state for? State Value?

Yes. Originally this thing was just called the state. But it was a bit
confusing in the code because there is also an enum desc_state (used for
state queries), which is _not_ the value that is stored in the state
variable. That's why the code is using state_var/state_val (SV) for the
actual data values, keeping it separate from desc_state/d_state for the
the state queries.

John Ogness

\
 
 \ /
  Last update: 2019-12-09 10:02    [W:0.104 / U:4.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site