Skip to content

Revert "[libc] Implement barriers for pthreads" #151014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions libc/config/linux/x86_64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1050,9 +1050,6 @@ if(LLVM_LIBC_FULL_BUILD)
libc.src.pthread.pthread_join
libc.src.pthread.pthread_key_create
libc.src.pthread.pthread_key_delete
libc.src.pthread.pthread_barrier_init
libc.src.pthread.pthread_barrier_wait
libc.src.pthread.pthread_barrier_destroy
libc.src.pthread.pthread_mutex_destroy
libc.src.pthread.pthread_mutex_init
libc.src.pthread.pthread_mutex_lock
Expand Down
9 changes: 0 additions & 9 deletions libc/hdr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ add_proxy_header_library(
libc.include.fenv
)

add_proxy_header_library(
pthread_macros
HDRS
pthread_macros.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-macros.pthread_macros
libc.include.pthread
)

add_proxy_header_library(
sched_macros
HDRS
Expand Down
22 changes: 0 additions & 22 deletions libc/hdr/pthread_macros.h

This file was deleted.

16 changes: 0 additions & 16 deletions libc/hdr/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,22 +241,6 @@ add_proxy_header_library(
libc.include.llvm-libc-types.pid_t
)

add_proxy_header_library(
pthread_barrier_t
HDRS
pthread_barrier_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.pthread_barrier_t
)

add_proxy_header_library(
pthread_barrierattr_t
HDRS
pthread_barrierattr_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.pthread_barrierattr_t
)

add_proxy_header_library(
atexithandler_t
HDRS
Expand Down
22 changes: 0 additions & 22 deletions libc/hdr/types/pthread_barrier_t.h

This file was deleted.

22 changes: 0 additions & 22 deletions libc/hdr/types/pthread_barrierattr_t.h

This file was deleted.

2 changes: 0 additions & 2 deletions libc/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ add_header_macro(
.llvm-libc-types.pthread_attr_t
.llvm-libc-types.pthread_condattr_t
.llvm-libc-types.pthread_key_t
.llvm-libc-types.pthread_barrier_t
.llvm-libc-types.pthread_barrierattr_t
.llvm-libc-types.pthread_mutex_t
.llvm-libc-types.pthread_mutexattr_t
.llvm-libc-types.pthread_once_t
Expand Down
2 changes: 0 additions & 2 deletions libc/include/llvm-libc-macros/pthread-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#define PTHREAD_MUTEX_STALLED 0
#define PTHREAD_MUTEX_ROBUST 1

#define PTHREAD_BARRIER_SERIAL_THREAD -1

#define PTHREAD_ONCE_INIT {0}

#define PTHREAD_PROCESS_PRIVATE 0
Expand Down
3 changes: 0 additions & 3 deletions libc/include/llvm-libc-types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ add_header(__exec_envp_t HDR __exec_envp_t.h)
add_header(__futex_word HDR __futex_word.h)
add_header(pid_t HDR pid_t.h)
add_header(__mutex_type HDR __mutex_type.h DEPENDS .__futex_word .pid_t)
add_header(__barrier_type HDR __barrier_type.h)
add_header(__pthread_once_func_t HDR __pthread_once_func_t.h)
add_header(__pthread_start_t HDR __pthread_start_t.h)
add_header(__pthread_tss_dtor_t HDR __pthread_tss_dtor_t.h)
Expand Down Expand Up @@ -54,8 +53,6 @@ add_header(pthread_condattr_t HDR pthread_condattr_t.h DEPENDS .clockid_t)
add_header(pthread_key_t HDR pthread_key_t.h)
add_header(pthread_mutex_t HDR pthread_mutex_t.h DEPENDS .__futex_word .__mutex_type)
add_header(pthread_mutexattr_t HDR pthread_mutexattr_t.h)
add_header(pthread_barrier_t HDR pthread_barrier_t.h)
add_header(pthread_barrierattr_t HDR pthread_barrierattr_t.h)
add_header(pthread_once_t HDR pthread_once_t.h DEPENDS .__futex_word)
add_header(pthread_rwlock_t HDR pthread_rwlock_t.h DEPENDS .__futex_word .pid_t)
add_header(pthread_rwlockattr_t HDR pthread_rwlockattr_t.h)
Expand Down
21 changes: 0 additions & 21 deletions libc/include/llvm-libc-types/__barrier_type.h

This file was deleted.

15 changes: 0 additions & 15 deletions libc/include/llvm-libc-types/pthread_barrier_t.h

This file was deleted.

16 changes: 0 additions & 16 deletions libc/include/llvm-libc-types/pthread_barrierattr_t.h

This file was deleted.

22 changes: 0 additions & 22 deletions libc/include/pthread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ types:
- type_name: pthread_once_t
- type_name: pthread_mutex_t
- type_name: pthread_mutexattr_t
- type_name: pthread_barrier_t
- type_name: pthread_barrierattr_t
- type_name: pthread_key_t
- type_name: pthread_condattr_t
- type_name: __pthread_tss_dtor_t
Expand Down Expand Up @@ -279,26 +277,6 @@ functions:
arguments:
- type: pthread_mutexattr_t *__restrict
- type: int
- name: pthread_barrier_init
standards:
- POSIX
return_type: int
arguments:
- type: pthread_barrier_t *__restrict
- type: const pthread_barrierattr_t *__restrict
- type: int
- name: pthread_barrier_wait
standards:
- POSIX
return_type: int
arguments:
- type: pthread_barrier_t *
- name: pthread_barrier_destroy
standards:
- POSIX
return_type: int
arguments:
- type: pthread_barrier_t *
- name: pthread_once
standards:
- POSIX
Expand Down
11 changes: 0 additions & 11 deletions libc/src/__support/threads/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,3 @@ add_object_library(
libc.src.__support.threads.linux.raw_mutex
libc.src.__support.CPP.mutex
)

add_object_library(
barrier
HDRS
barrier.h
SRCS
barrier.cpp
DEPENDS
libc.src.__support.threads.CndVar
libc.src.__support.threads.mutex
)
85 changes: 0 additions & 85 deletions libc/src/__support/threads/linux/barrier.cpp

This file was deleted.

50 changes: 0 additions & 50 deletions libc/src/__support/threads/linux/barrier.h

This file was deleted.

Loading
Loading