Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: third_party/tcmalloc/chromium/src/windows/port.h

Issue 7430007: Merge tcmalloc r111 (perftools v. 1.8) with the chromium/ branch. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/windows/port.h
===================================================================
--- third_party/tcmalloc/chromium/src/windows/port.h (revision 94429)
+++ third_party/tcmalloc/chromium/src/windows/port.h (working copy)
@@ -165,6 +165,10 @@
#endif /* __cplusplus */
#endif /* HAVE_PTHREAD */
+inline void sched_yield(void) {
+ Sleep(0);
+}
+
/*
* __declspec(thread) isn't usable in a dll opened via LoadLibrary().
* But it doesn't work to LoadLibrary() us anyway, because of all the
@@ -260,7 +264,7 @@
#define MAP_PRIVATE MEM_COMMIT
#define MAP_SHARED MEM_RESERVE /* value of this #define is 100% arbitrary */
-#if __STDC__
+#if __STDC__ && !defined(__MINGW32__)
typedef _off_t off_t;
#endif
@@ -372,7 +376,6 @@
inline int mkdir(const char *pathname, int) {
return _mkdir(pathname);
}
-#endif
inline FILE *popen(const char *command, const char *type) {
return _popen(command, type);
@@ -380,13 +383,14 @@
inline int pclose(FILE *stream) {
return _pclose(stream);
}
+#endif
EXTERN_C PERFTOOLS_DLL_DECL void WriteToStderr(const char* buf, int len);
/* ----------------------------------- SYSTEM/PROCESS */
typedef int pid_t;
-#if __STDC__
+#if __STDC__ && !defined(__MINGW32__)
inline pid_t getpid(void) { return _getpid(); }
#endif
inline pid_t getppid(void) { return 0; }

Powered by Google App Engine
This is Rietveld 408576698