Skip to content

Commit 3e6e4b7

Browse files
committed
remove mach-specific thread_port macro that should not be used on linux
whitespace Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
1 parent c4f4e68 commit 3e6e4b7

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/shims/linux_stubs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,3 @@ unsigned short dispatch_callout__return_semaphore;
5757
unsigned short dispatch_queue__push_semaphore;
5858
void (*_dispatch_block_special_invoke)(void*);
5959
struct dispatch_queue_attr_s _dispatch_queue_attr_concurrent;
60-

src/shims/tsd.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ _dispatch_thread_setspecific_packed_pair(pthread_key_t k1, pthread_key_t k2,
278278
_dispatch_thread_setspecific(k1, p[0]);
279279
_dispatch_thread_setspecific(k2, p[1]);
280280
}
281-
#endif
281+
#endif
282282

283283
#if TARGET_OS_WIN32
284284
#define _dispatch_thread_self() ((uintptr_t)GetCurrentThreadId())
@@ -293,12 +293,10 @@ _dispatch_thread_setspecific_packed_pair(pthread_key_t k1, pthread_key_t k2,
293293

294294
#if TARGET_OS_WIN32
295295
#define _dispatch_thread_port() ((mach_port_t)0)
296-
#else
296+
#elif !DISPATCH_USE_THREAD_LOCAL_STORAGE
297297
#if DISPATCH_USE_DIRECT_TSD
298298
#define _dispatch_thread_port() ((mach_port_t)(uintptr_t)\
299299
_dispatch_thread_getspecific(_PTHREAD_TSD_SLOT_MACH_THREAD_SELF))
300-
#elif DISPATCH_USE_THREAD_LOCAL_STORAGE
301-
#define _dispatch_thread_port() ((mach_port_t)(_dispatch_get_tsd_base()->tid))
302300
#else
303301
#define _dispatch_thread_port() pthread_mach_thread_np(_dispatch_thread_self())
304302
#endif

0 commit comments

Comments
 (0)