@@ -794,7 +794,10 @@ _dispatch_async_redirect_invoke(dispatch_continuation_t dc,
794
794
{
795
795
dispatch_thread_frame_s dtf ;
796
796
struct dispatch_continuation_s * other_dc = dc -> dc_other ;
797
- dispatch_invoke_flags_t ctxt_flags = (dispatch_invoke_flags_t )dc -> dc_ctxt ;
797
+ #if DISPATCH_SIZEOF_PTR == 8
798
+ dispatch_assert (((uintptr_t )dc -> dc_ctxt >> 32 ) == 0 );
799
+ #endif
800
+ dispatch_invoke_flags_t ctxt_flags = (dispatch_invoke_flags_t )(uintptr_t )dc -> dc_ctxt ;
798
801
// if we went through _dispatch_root_queue_push_override,
799
802
// the "right" root queue was stuffed into dc_func
800
803
dispatch_queue_global_t assumed_rq = (dispatch_queue_global_t )dc -> dc_func ;
@@ -5762,11 +5765,11 @@ dispatch_channel_enqueue(dispatch_channel_t dch, void *ctxt)
5762
5765
5763
5766
#ifndef __APPLE__
5764
5767
#if __BLOCKS__
5765
- void __typeof__ (dispatch_channel_async ) dispatch_channel_async
5768
+ __typeof__ (dispatch_channel_async ) dispatch_channel_async
5766
5769
__attribute__((__alias__ ("dispatch_async" )));
5767
5770
#endif
5768
5771
5769
- void __typeof__ (dispatch_channel_async_f ) dispatch_channel_async_f
5772
+ __typeof__ (dispatch_channel_async_f ) dispatch_channel_async_f
5770
5773
__attribute__((__alias__ ("dispatch_async_f" )));
5771
5774
#endif
5772
5775
@@ -6988,7 +6991,13 @@ _dispatch_worker_thread(void *context)
6988
6991
/* Set it up before the configure block so that it can get overridden by
6989
6992
* client if they want to name their threads differently */
6990
6993
if (dq -> _as_dq -> dq_label ) {
6994
+ #if defined(__APPLE__ )
6991
6995
pthread_setname_np (dq -> _as_dq -> dq_label );
6996
+ #elif defined(_WIN32 )
6997
+ SetThreadDescription (GetCurrentThread (), dq -> _as_dq -> dq_label );
6998
+ #else
6999
+ pthread_setname_np (pthread_self (), dq -> _as_dq -> dq_label );
7000
+ #endif
6992
7001
}
6993
7002
6994
7003
if (pqc -> dpq_thread_configure ) {
@@ -7886,7 +7895,7 @@ _dispatch_queue_cleanup2(void)
7886
7895
// similar non-POSIX API was called
7887
7896
// this has to run before the DISPATCH_COCOA_COMPAT below
7888
7897
// See dispatch_main for call to _dispatch_sig_thread on linux.
7889
- #ifndef __linux__
7898
+ #if 0
7890
7899
if (_dispatch_program_is_probably_callback_driven ) {
7891
7900
pthread_attr_t attr ;
7892
7901
pthread_attr_init (& attr );
@@ -8142,8 +8151,10 @@ DISPATCH_EXPORT DISPATCH_NOTHROW
8142
8151
void
8143
8152
libdispatch_init (void )
8144
8153
{
8154
+ #if 0
8145
8155
dispatch_assert (sizeof (struct dispatch_apply_s ) <=
8146
8156
DISPATCH_CONTINUATION_SIZE );
8157
+ #endif
8147
8158
8148
8159
if (_dispatch_getenv_bool ("LIBDISPATCH_STRICT" , false)) {
8149
8160
_dispatch_mode |= DISPATCH_MODE_STRICT ;
0 commit comments