This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stopping and resuming threads


Andrew Lunn wrote:
> 
> On Mon, Feb 04, 2002 at 05:38:31PM +0100, Tom Coremans wrote:
> > Hi all,
> >
> > I am trying to stop and resume a thread on ecos with
> > pthread_kill(thread,SIGSTOP) and pthread_kill(thread,SIGCONT) but that
> > doesn`t work because in ecos the signals sigstop and sigcont aren`t
> > defined.
> >
> > Can anybody give me a hint of what is the best method for doing this?
> 
> cyg_thread_suspend() and cyg_thread_resume()

Yep. Although note if you only have a pthread_t, this won't work with those
(they aren't interchangable with ecos thread handles). You will need to
have retrieved the thread handles from the threads themselves using
cyg_thread_self(). We don't have a public API to convert from one to the
other.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]