bungeman@google.com | 5548752 | 2012-05-14 14:09:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 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 | |
| 8 | #ifndef SkThreadUtils_PThreadData_DEFINED |
| 9 | #define SkThreadUtils_PThreadData_DEFINED |
| 10 | |
| 11 | #include "SkThreadUtils.h" |
| 12 | #include <pthread.h> |
| 13 | |
| 14 | class SkThread_PThreadData { |
| 15 | public: |
| 16 | SkThread_PThreadData(SkThread::entryPointProc entryPoint, void* data); |
| 17 | ~SkThread_PThreadData(); |
| 18 | pthread_t fPThread; |
| 19 | bool fValidPThread; |
| 20 | pthread_mutex_t fStartMutex; |
| 21 | pthread_cond_t fStartCondition; |
| 22 | pthread_attr_t fAttr; |
| 23 | |
| 24 | void* fParam; |
| 25 | SkThread::entryPointProc fEntryPoint; |
| 26 | bool fStarted; |
| 27 | }; |
| 28 | |
| 29 | #endif |