Re: How to suspend and resume (almost) all threads of a process ?
Re: How to suspend and resume (almost) all threads of a process ?
- Subject: Re: How to suspend and resume (almost) all threads of a process ?
- From: Steve Checkoway <email@hidden>
- Date: Thu, 20 Jan 2005 15:19:29 -0800
On Jan 20, 2005, at 2:58 PM, Nat! wrote:
Well the replies I got privately say, that you can't do that in
Darwin. You can probably get the lists of threads, but the suspension
of a related thread in the same process is not supported. That wraps
up this mail thread.
I don't claim to be any sort of expert on this but I don't think you
can suspend/resume threads using pthreads but I see no reason why you
couldn't do it via mach threads.
-- mach/ppc/thread_act.h --
...
/* Routine thread_suspend */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_suspend
(
thread_act_t target_act
);
/* Routine thread_resume */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_resume
(
thread_act_t target_act
);
...
Like I said, I'm no expert and perhaps there is a reason to not use the
mach thread api (such as there might not be a one to one correspondence
between mach threads and pthreads and that might be necessary for your
purposes).
- Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden