herb | e4c1735 | 2015-09-29 14:38:01 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 8 | #include "include/private/SkThreadID.h" |
herb | e4c1735 | 2015-09-29 14:38:01 -0700 | [diff] [blame] | 9 | |
| 10 | #ifdef SK_BUILD_FOR_WIN |
Ben Wagner | ab6eefe | 2019-05-20 11:02:49 -0400 | [diff] [blame] | 11 | #include "src/core/SkLeanWindows.h" |
herb | e4c1735 | 2015-09-29 14:38:01 -0700 | [diff] [blame] | 12 | SkThreadID SkGetThreadID() { return GetCurrentThreadId(); } |
| 13 | #else |
| 14 | #include <pthread.h> |
| 15 | SkThreadID SkGetThreadID() { return (int64_t)pthread_self(); } |
| 16 | #endif |