| OLD | NEW |
| 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 #include "build/build_config.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 pthread_key_t thread_key_; | 248 pthread_key_t thread_key_; |
| 249 DISALLOW_COPY_AND_ASSIGN(PThreadThreadVar); | 249 DISALLOW_COPY_AND_ASSIGN(PThreadThreadVar); |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 // Returns the absolute time ms milliseconds from now. Useful for passing | 252 // Returns the absolute time ms milliseconds from now. Useful for passing |
| 253 // result to pthread_cond_timedwait(). | 253 // result to pthread_cond_timedwait(). |
| 254 struct timespec GetPThreadAbsoluteTime(uint32 ms_from_now); | 254 struct timespec GetPThreadAbsoluteTime(uint32 ms_from_now); |
| 255 | 255 |
| 256 // 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 |
| 257 // 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. |
| 258 void NameCurrentThreadForDebugging(char* name); | 258 void NameCurrentThreadForDebugging(const char* name); |
| 259 | 259 |
| 260 #endif // CHROME_BROWSER_SYNC_UTIL_PTHREAD_HELPERS_H_ | 260 #endif // CHROME_BROWSER_SYNC_UTIL_PTHREAD_HELPERS_H_ |
| OLD | NEW |