Chromium Code Reviews| Index: src/trusted/service_runtime/osx/mach_thread_map.h |
| =================================================================== |
| --- src/trusted/service_runtime/osx/mach_thread_map.h (revision 0) |
| +++ src/trusted/service_runtime/osx/mach_thread_map.h (revision 0) |
| @@ -0,0 +1,47 @@ |
| +/* |
| + * Copyright (c) 2013 The Native Client Authors. All rights reserved. |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#ifndef NATIVE_CLIENT_SERVICE_RUNTIME_OSX_MACH_THREAD_MAP_H_ |
| +#define NATIVE_CLIENT_SERVICE_RUNTIME_OSX_MACH_THREAD_MAP_H_ 1 |
| + |
| +#include <mach/mach.h> |
| + |
| +#include "native_client/src/include/nacl_base.h" |
| +#include "native_client/src/include/nacl_compiler_annotations.h" |
| + |
| +EXTERN_C_BEGIN |
| + |
| +#if NACL_ARCH(NACL_BUILD_ARCH) != NACL_x86 || NACL_BUILD_SUBARCH != 32 |
| + |
| +void NaClInitMachThreadMap(void); |
| + |
| +size_t GetNaClThreadIndexForMachThread(mach_port_t mach_thread); |
|
Mark Seaborn
2013/02/14 00:37:54
These should have "NaCl" prefixes, e.g. NaClGetThr
|
| +void SetCurrentMachThreadForNaClThreadIndex(size_t nacl_thread_index); |
| +void ClearMachThreadForNaClThreadIndex(size_t nacl_thread_index); |
| + |
| +#else |
| + |
| +static INLINE void NaClInitMachThreadMap(void) {} |
| + |
| +static INLINE size_t GetNaClThreadIndexForMachThread(mach_port_t mach_thread) { |
| + UNREFERENCED_PARAMETER(mach_thread); |
| + return 0; |
| +} |
| + |
| +static INLINE void SetCurrentMachThreadForNaClThreadIndex( |
| + size_t nacl_thread_index) { |
| + UNREFERENCED_PARAMETER(nacl_thread_index); |
| +} |
| + |
| +static INLINE void ClearMachThreadForNaClThreadIndex(size_t nacl_thread_index) { |
| + UNREFERENCED_PARAMETER(nacl_thread_index); |
| +} |
| + |
| +#endif |
| + |
| +EXTERN_C_END |
| + |
| +#endif /* NATIVE_CLIENT_SERVICE_RUNTIME_OSX_MACH_THREAD_MAP_H_ */ |
| Property changes on: src/trusted/service_runtime/osx/mach_thread_map.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |