Skip to content

Commit 27595c4

Browse files
Revert "[libc][POSIX][pthreads] implemented missing pthread_rwlockattr functions" (#91966)
Reverts #90249 Fullbuild is broken: https://lab.llvm.org/buildbot/#/builders/163/builds/56501
1 parent 29a986b commit 27595c4

File tree

11 files changed

+3
-162
lines changed

11 files changed

+3
-162
lines changed

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,8 @@ if(LLVM_LIBC_FULL_BUILD)
673673
libc.src.pthread.pthread_mutexattr_settype
674674
libc.src.pthread.pthread_once
675675
libc.src.pthread.pthread_rwlockattr_destroy
676-
libc.src.pthread.pthread_rwlockattr_getkind_np
677676
libc.src.pthread.pthread_rwlockattr_getpshared
678677
libc.src.pthread.pthread_rwlockattr_init
679-
libc.src.pthread.pthread_rwlockattr_setkind_np
680678
libc.src.pthread.pthread_rwlockattr_setpshared
681679
libc.src.pthread.pthread_setspecific
682680

libc/include/pthread.h.def

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ enum {
3838
#define PTHREAD_PROCESS_PRIVATE 0
3939
#define PTHREAD_PROCESS_SHARED 1
4040

41-
#define PTHREAD_RWLOCK_PREFER_READER_NP 0
42-
#define PTHREAD_RWLOCK_PREFER_WRITER_NP 1
43-
#define PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 2
44-
45-
4641
%%public_api()
4742

4843
#endif // LLVM_LIBC_PTHREAD_H

libc/spec/posix.td

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,11 +1234,6 @@ def POSIX : StandardSpec<"POSIX"> {
12341234
RetValSpec<IntType>,
12351235
[ArgSpec<PThreadRWLockAttrTPtr>]
12361236
>,
1237-
FunctionSpec<
1238-
"pthread_rwlockattr_getkind_np",
1239-
RetValSpec<IntType>,
1240-
[ArgSpec<PThreadRWLockAttrTPtr>, ArgSpec<IntPtr>]
1241-
>,
12421237
FunctionSpec<
12431238
"pthread_rwlockattr_getpshared",
12441239
RetValSpec<IntType>,
@@ -1249,11 +1244,6 @@ def POSIX : StandardSpec<"POSIX"> {
12491244
RetValSpec<IntType>,
12501245
[ArgSpec<PThreadRWLockAttrTPtr>]
12511246
>,
1252-
FunctionSpec<
1253-
"pthread_rwlockattr_setkind_np",
1254-
RetValSpec<IntType>,
1255-
[ArgSpec<PThreadRWLockAttrTPtr>, ArgSpec<IntType>]
1256-
>,
12571247
FunctionSpec<
12581248
"pthread_rwlockattr_setpshared",
12591249
RetValSpec<IntType>,

libc/src/pthread/CMakeLists.txt

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,6 @@ add_entrypoint_object(
470470
libc.include.pthread
471471
)
472472

473-
add_entrypoint_object(
474-
pthread_rwlockattr_getkind_np
475-
SRCS
476-
pthread_rwlockattr_getkind_np.cpp
477-
HDRS
478-
pthread_rwlockattr_getkind_np.h
479-
DEPENDS
480-
libc.include.pthread
481-
)
482-
483473
add_entrypoint_object(
484474
pthread_rwlockattr_getpshared
485475
SRCS
@@ -500,17 +490,6 @@ add_entrypoint_object(
500490
libc.include.pthread
501491
)
502492

503-
add_entrypoint_object(
504-
pthread_rwlockattr_setkind_np
505-
SRCS
506-
pthread_rwlockattr_setkind_np.cpp
507-
HDRS
508-
pthread_rwlockattr_setkind_np.h
509-
DEPENDS
510-
libc.include.pthread
511-
libc.include.errno
512-
)
513-
514493
add_entrypoint_object(
515494
pthread_rwlockattr_setpshared
516495
SRCS

libc/src/pthread/pthread_rwlockattr_getkind_np.cpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

libc/src/pthread/pthread_rwlockattr_getkind_np.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

libc/src/pthread/pthread_rwlockattr_init.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ namespace LIBC_NAMESPACE {
1717
LLVM_LIBC_FUNCTION(int, pthread_rwlockattr_init,
1818
(pthread_rwlockattr_t * attr)) {
1919
attr->pshared = PTHREAD_PROCESS_PRIVATE;
20-
attr->pref = PTHREAD_RWLOCK_PREFER_READER_NP;
2120
return 0;
2221
}
2322

libc/src/pthread/pthread_rwlockattr_setkind_np.cpp

Lines changed: 0 additions & 30 deletions
This file was deleted.

libc/src/pthread/pthread_rwlockattr_setkind_np.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

libc/test/src/pthread/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ add_libc_unittest(
6868
libc.include.errno
6969
libc.include.pthread
7070
libc.src.pthread.pthread_rwlockattr_destroy
71-
libc.src.pthread.pthread_rwlockattr_getkind_np
7271
libc.src.pthread.pthread_rwlockattr_getpshared
7372
libc.src.pthread.pthread_rwlockattr_init
74-
libc.src.pthread.pthread_rwlockattr_setkind_np
7573
libc.src.pthread.pthread_rwlockattr_setpshared
7674
)

0 commit comments

Comments
 (0)