blob: e882834e72fecece31f4ce96810923f60dca91eb [file] [log] [blame]
herbe4c17352015-09-29 14:38:01 -07001/*
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 Kleinc0bd9f92019-04-23 12:05:21 -05008#include "include/private/SkThreadID.h"
herbe4c17352015-09-29 14:38:01 -07009
10#ifdef SK_BUILD_FOR_WIN
Ben Wagnerab6eefe2019-05-20 11:02:49 -040011 #include "src/core/SkLeanWindows.h"
herbe4c17352015-09-29 14:38:01 -070012 SkThreadID SkGetThreadID() { return GetCurrentThreadId(); }
13#else
14 #include <pthread.h>
15 SkThreadID SkGetThreadID() { return (int64_t)pthread_self(); }
16#endif