File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1087,32 +1087,6 @@ private extern(D) void* getStackBottom() nothrow @nogc
10871087}
10881088
10891089
1090- // Returns true on success
1091- // TODO: move to posix_impl module
1092- version (Posix )
1093- package bool suspendThreadImpl(Thread t) @nogc nothrow
1094- {
1095- version (Darwin)
1096- return thread_suspend (t.m_tmach) == KERN_SUCCESS ;
1097- else version (Solaris )
1098- return thr_suspend (t.m_addr) == 0 ;
1099- else
1100- return pthread_kill (t.m_addr, suspendSignalNumber) == 0 ;
1101- }
1102-
1103- // Returns true on success
1104- // TODO: move to posix_impl module
1105- version (Posix )
1106- package bool resumeThreadImpl(Thread t) @nogc nothrow
1107- {
1108- version (Darwin)
1109- return thread_resume (t.m_tmach) == KERN_SUCCESS ;
1110- else version (Solaris )
1111- return thr_continue (t.m_addr) == 0 ;
1112- else
1113- return pthread_kill (t.m_addr, resumeSignalNumber) == 0 ;
1114- }
1115-
11161090/**
11171091 * Suspend the specified thread and load stack and register information for
11181092 * use by thread_scanAll. If the supplied thread is the calling thread,
Original file line number Diff line number Diff line change 627627package __gshared int suspendSignalNumber;
628628package __gshared int resumeSignalNumber;
629629
630+ // Returns true on success
631+ package bool suspendThreadImpl(Thread t) @nogc nothrow
632+ {
633+ version (Darwin)
634+ return thread_suspend (t.m_tmach) == KERN_SUCCESS ;
635+ else version (Solaris )
636+ return thr_suspend (t.m_addr) == 0 ;
637+ else
638+ return pthread_kill (t.m_addr, suspendSignalNumber) == 0 ;
639+ }
640+
641+ // Returns true on success
642+ package bool resumeThreadImpl(Thread t) @nogc nothrow
643+ {
644+ version (Darwin)
645+ return thread_resume (t.m_tmach) == KERN_SUCCESS ;
646+ else version (Solaris )
647+ return thr_continue (t.m_addr) == 0 ;
648+ else
649+ return pthread_kill (t.m_addr, resumeSignalNumber) == 0 ;
650+ }
651+
630652package alias gettid = imported! " core.sys.posix.pthread" .pthread_self;
You can’t perform that action at this time.
0 commit comments