diff options
author | Benjamin Barenblat <bbaren@google.com> | 2023-09-19 11:38:17 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2023-09-19 11:38:17 -0400 |
commit | a288b41a0e8aa6ca4549165bea98e26fa19f2c29 (patch) | |
tree | 5fa2b5bd51664ee54b87b63f4d08bb4f96c390a3 | |
parent | d26e0034ed79dd474368bbbecaa68fc830bbd1be (diff) | |
parent | fb3621f4f897824c0dbe0615fa94543df6192f30 (diff) |
Merge upstream LTS update 20230802.1
-rw-r--r-- | absl/base/config.h | 2 | ||||
-rw-r--r-- | absl/base/internal/sysinfo.cc | 20 | ||||
-rw-r--r-- | absl/synchronization/internal/waiter.h | 2 |
3 files changed, 23 insertions, 1 deletions
diff --git a/absl/base/config.h b/absl/base/config.h index 1de79930..ff0c2978 100644 --- a/absl/base/config.h +++ b/absl/base/config.h @@ -112,7 +112,7 @@ // LTS releases can be obtained from // https://github.com/abseil/abseil-cpp/releases. #define ABSL_LTS_RELEASE_VERSION 20230802 -#define ABSL_LTS_RELEASE_PATCH_LEVEL 0 +#define ABSL_LTS_RELEASE_PATCH_LEVEL 1 // Helper macro to convert a CPP variable to a string literal. #define ABSL_INTERNAL_DO_TOKEN_STR(x) #x diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc index 8bcc4faf..79eaba3e 100644 --- a/absl/base/internal/sysinfo.cc +++ b/absl/base/internal/sysinfo.cc @@ -34,6 +34,14 @@ #include <sys/sysctl.h> #endif +#ifdef __FreeBSD__ +#include <pthread_np.h> +#endif + +#ifdef __NetBSD__ +#include <lwp.h> +#endif + #if defined(__myriad2__) #include <rtems.h> #endif @@ -432,6 +440,18 @@ pid_t GetTID() { return static_cast<pid_t>(tid); } +#elif defined(__FreeBSD__) + +pid_t GetTID() { return static_cast<pid_t>(pthread_getthreadid_np()); } + +#elif defined(__OpenBSD__) + +pid_t GetTID() { return getthrid(); } + +#elif defined(__NetBSD__) + +pid_t GetTID() { return static_cast<pid_t>(_lwp_self()); } + #elif defined(__native_client__) pid_t GetTID() { diff --git a/absl/synchronization/internal/waiter.h b/absl/synchronization/internal/waiter.h index 1a8b0b83..6ba204be 100644 --- a/absl/synchronization/internal/waiter.h +++ b/absl/synchronization/internal/waiter.h @@ -40,6 +40,8 @@ #define ABSL_WAITER_MODE ABSL_WAITER_MODE_SEM #elif defined(ABSL_INTERNAL_HAVE_PTHREAD_WAITER) #define ABSL_WAITER_MODE ABSL_WAITER_MODE_CONDVAR +#elif defined(ABSL_INTERNAL_HAVE_STDCPP_WAITER) +#define ABSL_WAITER_MODE ABSL_WAITER_MODE_STDCPP #else #error ABSL_WAITER_MODE is undefined #endif |