summaryrefslogtreecommitdiff
path: root/absl/base/internal/sysinfo.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2019-11-26 09:00:19 -0800
committerGravatar Gennadiy Rozental <rogeeff@google.com>2019-11-26 12:37:42 -0500
commit0514227d2547793b23e209809276375e41c76617 (patch)
treef2cfabd8a93bf4308eb62cad6e672d821bca0725 /absl/base/internal/sysinfo.h
parent7f4fe64af80fe3c84db8ea938276c3690573c45e (diff)
Export of internal Abseil changes
-- 2ba0e41a21fbdab36b2f4f3b0dd4b112bd788604 by Derek Mauro <dmauro@google.com>: Remove the include of <intsafe.h>, which is missing on some versions of MinGW. DWORD is easily replaced by uint32_t. PiperOrigin-RevId: 282576177 -- 238fd41114b3e83fcb91d2afe1e6dcce7cfd53b0 by Samuel Benzaquen <sbenza@google.com>: Remove assertion in erase(iterator) that tries to use the comparator. Add missing this-> qualifier. Fix bug where node elements are not being destroyed properly. PiperOrigin-RevId: 282427096 -- 6b9446e3b38ed97451c010933e86a572ab659ab2 by Derek Mauro <dmauro@google.com>: Improves/fixes feature detection in thread_identity Only use ABSL_PER_THREAD_TLS_KEYWORD when it is supported (previously on some platforms it evaluated to nothing, which completely breaks everything), but prefer it to thread_local since benchmarks indicate it is slightly faster in this critical code path. Disable the calls to pthread_sigmask on MinGW where it is not supported. PiperOrigin-RevId: 282425291 GitOrigin-RevId: 2ba0e41a21fbdab36b2f4f3b0dd4b112bd788604 Change-Id: I34073ecbb4a43ad71f54161c136d88fc728888f1
Diffstat (limited to 'absl/base/internal/sysinfo.h')
-rw-r--r--absl/base/internal/sysinfo.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/absl/base/internal/sysinfo.h b/absl/base/internal/sysinfo.h
index b864a597..93356d80 100644
--- a/absl/base/internal/sysinfo.h
+++ b/absl/base/internal/sysinfo.h
@@ -26,10 +26,10 @@
#ifndef _WIN32
#include <sys/types.h>
-#else
-#include <intsafe.h>
#endif
+#include <cstdint>
+
#include "absl/base/port.h"
namespace absl {
@@ -51,9 +51,10 @@ int NumCPUs();
// On Linux, you may send a signal to the resulting ID with kill(). However,
// it is recommended for portability that you use pthread_kill() instead.
#ifdef _WIN32
-// On Windows, process id and thread id are of the same type according to
-// the return types of GetProcessId() and GetThreadId() are both DWORD.
-using pid_t = DWORD;
+// On Windows, process id and thread id are of the same type according to the
+// return types of GetProcessId() and GetThreadId() are both DWORD, an unsigned
+// 32-bit type.
+using pid_t = uint32_t;
#endif
pid_t GetTID();