[libc] Use the new style includes
authorPetr Hosek <phosek@google.com>
Wed, 5 Jul 2023 17:42:39 +0000 (17:42 +0000)
committerPetr Hosek <phosek@google.com>
Wed, 5 Jul 2023 17:51:41 +0000 (17:51 +0000)
We should be using the standard includes.

Differential Revision: https://reviews.llvm.org/D154529

29 files changed:
libc/src/pthread/pthread_mutex_init.h
libc/src/signal/linux/signal_utils.h
libc/src/signal/linux/sigprocmask.cpp
libc/src/signal/raise.h
libc/src/signal/sigdelset.h
libc/src/signal/sigemptyset.h
libc/src/signal/sigfillset.h
libc/src/signal/signal.h
libc/src/signal/sigprocmask.h
libc/src/threads/cnd_broadcast.h
libc/src/threads/cnd_destroy.h
libc/src/threads/cnd_init.h
libc/src/threads/cnd_signal.h
libc/src/threads/cnd_wait.h
libc/src/threads/linux/CndVar.h
libc/src/threads/mtx_destroy.cpp
libc/src/threads/mtx_destroy.h
libc/src/threads/mtx_init.cpp
libc/src/threads/mtx_init.h
libc/src/threads/mtx_lock.cpp
libc/src/threads/mtx_lock.h
libc/src/threads/mtx_unlock.cpp
libc/src/threads/mtx_unlock.h
libc/src/threads/thrd_current.h
libc/src/threads/thrd_detach.h
libc/src/threads/thrd_equal.h
libc/src/threads/thrd_exit.h
libc/src/threads/thrd_join.h
libc/src/time/nanosleep.cpp

index d25fe89..237ea18 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_PTHREAD_PTHREAD_MUTEX_INIT_H
 #define LLVM_LIBC_SRC_PTHREAD_PTHREAD_MUTEX_INIT_H
 
-#include "include/pthread.h"
+#include <pthread.h>
 
 namespace __llvm_libc {
 
index ce8a07a..3e9e701 100644 (file)
@@ -9,12 +9,12 @@
 #ifndef LLVM_LIBC_SRC_SIGNAL_LINUX_SIGNAL_UTILS_H
 #define LLVM_LIBC_SRC_SIGNAL_LINUX_SIGNAL_UTILS_H
 
-#include "include/sys/syscall.h"          // For syscall numbers.
 #include "src/__support/OSUtil/syscall.h" // For internal syscall function.
 #include "src/__support/common.h"
 
 #include <signal.h>
 #include <stddef.h>
+#include <sys/syscall.h>          // For syscall numbers.
 
 namespace __llvm_libc {
 
index c128197..242e055 100644 (file)
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/signal/sigprocmask.h"
-#include "include/sys/syscall.h"          // For syscall numbers.
 #include "src/__support/OSUtil/syscall.h" // For internal syscall function.
 #include "src/errno/libc_errno.h"
 #include "src/signal/linux/signal_utils.h"
@@ -15,6 +14,7 @@
 #include "src/__support/common.h"
 
 #include <signal.h>
+#include <sys/syscall.h> // For syscall numbers.
 
 namespace __llvm_libc {
 
index 00fd4c8..624b93c 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SIGNAL_RAISE_H
 #define LLVM_LIBC_SRC_SIGNAL_RAISE_H
 
-#include "include/signal.h"
+#include <signal.h>
 
 namespace __llvm_libc {
 
index a005d9c..2283bb5 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SIGNAL_SIGDELSET_H
 #define LLVM_LIBC_SRC_SIGNAL_SIGDELSET_H
 
-#include "include/signal.h"
+#include <signal.h>
 
 namespace __llvm_libc {
 
index 0651c73..bcb9c1a 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SIGNAL_SIGEMPTYSET_H
 #define LLVM_LIBC_SRC_SIGNAL_SIGEMPTYSET_H
 
-#include "include/signal.h"
+#include <signal.h>
 
 namespace __llvm_libc {
 
index ed3612c..08a70a4 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SIGNAL_SIGFILLSET_H
 #define LLVM_LIBC_SRC_SIGNAL_SIGFILLSET_H
 
-#include "include/signal.h"
+#include <signal.h>
 
 namespace __llvm_libc {
 
index 4315497..c45564c 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SIGNAL_SIGNAL_H
 #define LLVM_LIBC_SRC_SIGNAL_SIGNAL_H
 
-#include "include/signal.h"
+#include <signal.h>
 
 namespace __llvm_libc {
 
index 353c0c8..490a16d 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SIGNAL_SIGPROCMASK_H
 #define LLVM_LIBC_SRC_SIGNAL_SIGPROCMASK_H
 
-#include "include/signal.h"
+#include <signal.h>
 
 namespace __llvm_libc {
 
index 219341b..fd02195 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_CND_BROADCAST_H
 #define LLVM_LIBC_SRC_THREADS_CND_BROADCAST_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 4fa1ea1..3400257 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_CND_DESTROY_H
 #define LLVM_LIBC_SRC_THREADS_CND_DESTROY_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 8c14c88..826564b 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_CND_INIT_H
 #define LLVM_LIBC_SRC_THREADS_CND_INIT_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index d85802d..ec2a977 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_CND_SIGNAL_H
 #define LLVM_LIBC_SRC_THREADS_CND_SIGNAL_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 5f9ac08..812e704 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_CND_WAIT_H
 #define LLVM_LIBC_SRC_THREADS_CND_WAIT_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index c526277..c6b0ea6 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef LLVM_LIBC_SRC_THREADS_LINUX_CNDVAR_H
 #define LLVM_LIBC_SRC_THREADS_LINUX_CNDVAR_H
 
-#include "include/sys/syscall.h" // For syscall numbers.
-#include "include/threads.h"     // For values like thrd_success etc.
 #include "src/__support/CPP/atomic.h"
 #include "src/__support/OSUtil/syscall.h" // For syscall functions.
 #include "src/__support/threads/linux/futex_word.h"
@@ -18,6 +16,8 @@
 
 #include <linux/futex.h> // For futex operations.
 #include <stdint.h>
+#include <sys/syscall.h> // For syscall numbers.
+#include <threads.h>     // For values like thrd_success etc.
 
 namespace __llvm_libc {
 
index 6285b2c..6432700 100644 (file)
@@ -7,10 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/threads/mtx_destroy.h"
-#include "include/threads.h" // For mtx_t definition.
 #include "src/__support/common.h"
 #include "src/__support/threads/mutex.h"
 
+#include <threads.h> // For mtx_t definition.
+
 namespace __llvm_libc {
 
 LLVM_LIBC_FUNCTION(void, mtx_destroy, (mtx_t *)) {}
index c123b81..353bc27 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_MTX_DESTROY_H
 #define LLVM_LIBC_SRC_THREADS_MTX_DESTROY_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 1e4da79..188209c 100644 (file)
@@ -7,10 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/threads/mtx_init.h"
-#include "include/threads.h" // For mtx_t definition.
 #include "src/__support/common.h"
 #include "src/__support/threads/mutex.h"
 
+#include <threads.h> // For mtx_t definition.
+
 namespace __llvm_libc {
 
 static_assert(sizeof(Mutex) <= sizeof(mtx_t),
index 7eed5ec..8fcaa42 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_MTX_INIT_H
 #define LLVM_LIBC_SRC_THREADS_MTX_INIT_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 9200fed..58379f6 100644 (file)
@@ -7,10 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/threads/mtx_lock.h"
-#include "include/threads.h" // For mtx_t definition.
 #include "src/__support/common.h"
 #include "src/__support/threads/mutex.h"
 
+#include <threads.h> // For mtx_t definition.
+
 namespace __llvm_libc {
 
 // The implementation currently handles only plain mutexes.
index 5086f77..df3ec0d 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_MTX_LOCK_H
 #define LLVM_LIBC_SRC_THREADS_MTX_LOCK_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 1b97121..f5c6a13 100644 (file)
@@ -7,10 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/threads/mtx_unlock.h"
-#include "include/threads.h" // For mtx_t definition.
 #include "src/__support/common.h"
 #include "src/__support/threads/mutex.h"
 
+#include <threads.h> // For mtx_t definition.
+
 namespace __llvm_libc {
 
 // The implementation currently handles only plain mutexes.
index 55f0b4a..b58df63 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_MTX_UNLOCK_H
 #define LLVM_LIBC_SRC_THREADS_MTX_UNLOCK_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 774b445..338a16d 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_THRD_CURRENT_H
 #define LLVM_LIBC_SRC_THREADS_THRD_CURRENT_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 176770d..58d36e8 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_THRD_DETACH_H
 #define LLVM_LIBC_SRC_THREADS_THRD_DETACH_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 123563e..9e1bebc 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_THRD_EQUAL_H
 #define LLVM_LIBC_SRC_THREADS_THRD_EQUAL_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index feed470..4cc8351 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_THRD_EXIT_H
 #define LLVM_LIBC_SRC_THREADS_THRD_EXIT_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index 248bced..d86529c 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_THREADS_THRD_JOIN_H
 #define LLVM_LIBC_SRC_THREADS_THRD_JOIN_H
 
-#include "include/threads.h"
+#include <threads.h>
 
 namespace __llvm_libc {
 
index f0458de..bd81269 100644 (file)
@@ -8,11 +8,12 @@
 
 #include "src/time/nanosleep.h"
 
-#include "include/sys/syscall.h"          // For syscall numbers.
 #include "src/__support/OSUtil/syscall.h" // For syscall functions.
 #include "src/__support/common.h"
 #include "src/errno/libc_errno.h"
 
+#include <sys/syscall.h> // For syscall numbers.
+
 namespace __llvm_libc {
 
 // TODO(michaelrj): Move this into time/linux with the other syscalls.