| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright 2010 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 | 7 |
| 8 // This module defines the interface for interacting with platform specific | 8 // This module defines the interface for interacting with platform specific |
| 9 // threads . This API provides a mechanism to query for a thread, by using | 9 // threads . This API provides a mechanism to query for a thread, by using |
| 10 // the acquire method with the ID of a pre-existing thread. The register | 10 // the acquire method with the ID of a pre-existing thread. The register |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual bool Suspend() = 0; | 50 virtual bool Suspend() = 0; |
| 51 virtual bool Resume() = 0; | 51 virtual bool Resume() = 0; |
| 52 | 52 |
| 53 virtual void *GetContext() = 0; | 53 virtual void *GetContext() = 0; |
| 54 | 54 |
| 55 static IThread *Create(uint32_t id, struct NaClAppThread *natp); | 55 static IThread *Create(uint32_t id, struct NaClAppThread *natp); |
| 56 static IThread *Acquire(uint32_t id); | 56 static IThread *Acquire(uint32_t id); |
| 57 static void Release(IThread *thread); | 57 static void Release(IThread *thread); |
| 58 static void SetExceptionCatch(CatchFunc_t func, void *cookie); | 58 static void SetExceptionCatch(CatchFunc_t func, void *cookie); |
| 59 | 59 |
| 60 static void SuspendAll(uint32_t signaled_id); |
| 61 static void ResumeAll(uint32_t signaled_id); |
| 62 |
| 60 protected: | 63 protected: |
| 61 virtual ~IThread() {} // Prevent delete of base pointer | 64 virtual ~IThread() {} // Prevent delete of base pointer |
| 62 }; | 65 }; |
| 63 | 66 |
| 64 } // namespace port | 67 } // namespace port |
| 65 | 68 |
| 66 #endif // PORT_THREAD_H_ | 69 #endif // PORT_THREAD_H_ |
| 67 | 70 |
| OLD | NEW |