[libc-commits] [libc] [libc] add rwlock (PR #94156)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Wed Jun 12 10:57:22 PDT 2024
================
@@ -0,0 +1,70 @@
+//===-- Linux implementation of the pthread_rwlock_init function ----------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/pthread/pthread_rwlock_init.h"
+
+#include "src/__support/common.h"
+#include "src/__support/libc_assert.h"
+#include "src/__support/threads/linux/rwlock.h"
+
+#include <errno.h>
+#include <pthread.h>
+
+LIBC_INLINE void *operator new(size_t, pthread_rwlock_t *addr) noexcept {
----------------
michaelrj-google wrote:
why is an overload of `new` defined here?
https://github.com/llvm/llvm-project/pull/94156
More information about the libc-commits
mailing list