On Mon, Oct 10, 2016 at 4:48 PM, Kees Cook <keesc...@chromium.org> wrote: > On Fri, Oct 7, 2016 at 10:28 PM, Joel Fernandes <joe...@google.com> wrote: >> In preparation of not locking at all for certain buffers depending on if >> there's contention, make locking optional depending if caller requested it. > > This should be a bool argument (or enum), with named values so it's > more readable. For example, these don't immediately tell me what the > argument does: > > persistent_ram_write(cxt->cprz, buf, size, 1); > persistent_ram_write(cxt->cprz, buf, size, true); > > But this does: > > persistent_ram_write(cxt->cprz, buf, size, PSTORE_REQUIRE_LOCKING); > > As part of this, can you document in the pstore structure which types > of front-ends require locking and if they don't, why?
Sure, I will make it more descriptive as you suggested. Thanks, Joel