Issue 89443
Summary [libc][gnu ext] implement pthread_rwlockattr_{get|set}kind_np
Labels good first issue, libc
Assignees
Reporter nickdesaulniers
    These functions are perhaps useful. Not implemented in #89322 because I didn't know they existed.

Since these aren't POSIX but instead gnu extensions, these should go in FOO rather than libc/spec/posix.td; we already have an entry for pthreads.h in that file.  It will be easier for someone to start on this once #89322 lands.

I would extend our definition of `pthread_rwlockattr_t` in libc/include/llvm-libc-types/pthread_rwlockattr_t.h to include a new `int` member named `pref` such that these functions are simple getters and setters.

Then it sounds like we should define 3 macros (in libc/include/pthread.h.def, though keep an eye on https://github.com/llvm/llvm-project/issues/88997, too)
- PTHREAD_RWLOCK_PREFER_READER_NP
- PTHREAD_RWLOCK_PREFER_WRITER_NP
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to