[libc-commits] [libc] Add named posix semaphore lifetime operations on linux (PR #192278)
Schrodinger ZHU Yifan via libc-commits
libc-commits at lists.llvm.org
Tue Apr 21 20:17:58 PDT 2026
================
@@ -21,9 +21,19 @@ namespace LIBC_NAMESPACE_DECL {
namespace shm_common {
LIBC_INLINE_VAR constexpr cpp::string_view SHM_PREFIX = "/dev/shm/";
-using SHMPath = cpp::array<char, NAME_MAX + SHM_PREFIX.size() + 1>;
-LIBC_INLINE ErrorOr<SHMPath> translate_name(cpp::string_view name) {
+// Fixed-size buffer for a path of the form: "<Prefix><name>", name is at
+// most NAME_MAX bytes.
+template <const cpp::string_view &Prefix>
----------------
SchrodingerZhu wrote:
I see. Let's keep it in this form then. We are migrating to C++20 soon.
https://github.com/llvm/llvm-project/pull/192278
More information about the libc-commits
mailing list