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

Side by Side Diff: chrome/browser/sync/util/pthread_helpers.h

Issue 193103: Build sync engine as part of the browser build (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_UTIL_PTHREAD_HELPERS_H_ 5 #ifndef CHROME_BROWSER_SYNC_UTIL_PTHREAD_HELPERS_H_
6 #define CHROME_BROWSER_SYNC_UTIL_PTHREAD_HELPERS_H_ 6 #define CHROME_BROWSER_SYNC_UTIL_PTHREAD_HELPERS_H_
7 7
8 #include <pthread.h> 8 #include <pthread.h>
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h"
10 11
11 #ifdef OS_WINDOWS 12 #ifdef OS_WIN
12 typedef void* thread_handle; 13 typedef void* thread_handle;
13 #else 14 #else
14 typedef pthread_t thread_handle; 15 typedef pthread_t thread_handle;
15 #endif 16 #endif
16 17
17 // Creates a pthread, detaches from it, and returns a Win32 HANDLE for it that 18 // Creates a pthread, detaches from it, and returns a Win32 HANDLE for it that
18 // the caller must CloseHandle(). 19 // the caller must CloseHandle().
19 thread_handle CreatePThread(void* (*start)(void* payload), void* parameter); 20 thread_handle CreatePThread(void* (*start)(void* payload), void* parameter);
20 21
21 class PThreadRWLock { 22 class PThreadRWLock {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 251
251 // Returns the absolute time ms milliseconds from now. Useful for passing 252 // Returns the absolute time ms milliseconds from now. Useful for passing
252 // result to pthread_cond_timedwait(). 253 // result to pthread_cond_timedwait().
253 struct timespec GetPThreadAbsoluteTime(uint32 ms_from_now); 254 struct timespec GetPThreadAbsoluteTime(uint32 ms_from_now);
254 255
255 // Assign a descriptive label to the current thread. This is useful to see 256 // Assign a descriptive label to the current thread. This is useful to see
256 // in a GUI debugger, but may not be implementable on all platforms. 257 // in a GUI debugger, but may not be implementable on all platforms.
257 void NameCurrentThreadForDebugging(char* name); 258 void NameCurrentThreadForDebugging(char* name);
258 259
259 #endif // CHROME_BROWSER_SYNC_UTIL_PTHREAD_HELPERS_H_ 260 #endif // CHROME_BROWSER_SYNC_UTIL_PTHREAD_HELPERS_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/util/path_helpers_unittest.cc ('k') | chrome/browser/sync/util/pthread_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698