[libc-commits] [libc] [libc] rework mutex (PR #92168)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Fri May 24 10:33:46 PDT 2024


================
@@ -54,7 +54,7 @@ class Dir {
   Dir(const Dir &) = delete;
 
   explicit Dir(int fdesc)
-      : fd(fdesc), readptr(0), fillsize(0), mutex(false, false, false) {}
+      : fd(fdesc), readptr(0), fillsize(0), mutex(false, false, false, false) {}
----------------
nickdesaulniers wrote:

A common pattern used throughout LLVM when we have boolean parameters is to add a comments like:

```suggestion
      : fd(fdesc), readptr(0), fillsize(0), mutex(/*timed=*/false, /*recursive=*/false, /*robust=*/false, /*pshared=*/false) {}
```

Let's do that here and elsewhere throughout this patch to improve readability.

https://llvm.org/docs/CodingStandards.html#comment-formatting

https://github.com/llvm/llvm-project/pull/92168


More information about the libc-commits mailing list