This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: stopping and resuming threads
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Andrew Lunn <andrew dot lunn at ascom dot ch>
- Cc: Tom Coremans <tom dot coremans at acunia dot com>,ecos-discuss at sources dot redhat dot com
- Date: Tue, 05 Feb 2002 14:26:18 +0000
- Subject: Re: [ECOS] stopping and resuming threads
- Organization: Red Hat UK Ltd.
- References: <3C5EB907.BDAC0EB6@acunia.com> <20020204174000.A26056@biferten.ma.tech.ascom.ch>
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