Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to pause a thread?: (4 Items)
   
How to pause a thread?  
I couldn't find pthread_suspend() and pthread_resume() calls in neutrino library reference.

do we have any alternate calls to pause a thread?
RE: How to pause a thread?  



> I couldn't find pthread_suspend() and pthread_resume() calls in neutrino library reference.

> do we have any alternate calls to pause a thread?

There's pause() which will pause until a signal is received.  If
you don't want to get into signals and want something more synchronous
you could probably implement something similar to pthread_suspend()/
pthread_resume() with pthread_cond_wait() / pthread_cond_signal().

-seanb

Attachment: Text winmail.dat 2.37 KB
AW: How to pause a thread?  
guess he is looking for something different.
take a look at
   ThreadCtl(_NTO_TCTL_ONE_THREAD_HOLD, data)
   ThreadCtl(_NTO_TCTL_ONE_THREAD_CONT, data)
in the ref lib
/hp

-----Ursprüngliche Nachricht-----
Von:	Sean Boudreau [mailto:community-noreply@qnx.com]
Gesendet:	Di 23.12.2008 14:11
An:	ostech-core_os
Cc:	
Betreff:	RE: How to pause a thread?





> I couldn't find pthread_suspend() and pthread_resume() calls in neutrino library reference.

> do we have any alternate calls to pause a thread?

There's pause() which will pause until a signal is received.  If
you don't want to get into signals and want something more synchronous
you could probably implement something similar to pthread_suspend()/
pthread_resume() with pthread_cond_wait() / pthread_cond_signal().

-seanb



_______________________________________________
OSTech
http://community.qnx.com/sf/go/post19172 
 
*******************************************
Harman Becker Automotive Systems GmbH
Management Board: Dr. Klaus Blickle (Chairman), Dr. Udo Hüls, Michael Mauser
Chairman of the Supervisory Board: Ansgar Rempp | Domicile: Karlsbad | 
Local Court Mannheim: Register No. 361395

 
*******************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat 
sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail
. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have 
received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the contents in this e-mail is strictly forbidden.
*******************************************
Attachment: Text winmail.dat 3.51 KB
Re: How to pause a thread?  
gani koduri wrote:


> I couldn't find pthread_suspend() and pthread_resume() calls in neutrino library reference.
>
> do we have any alternate calls to pause a thread?
>   
Perhaps a bit heavy handed, but you could look at the ThreadCtl() kernel 
API that provides
a hold/continue functionality.  This is an OS level suspension as 
opposed to the more co-operative
routines such as pthread_cancel() that would cancel at certain operating 
points.

See:
http://www.qnx.com/developers/docs/6.4.0/neutrino/lib_ref/t/threadctl.html

For more details.

Hope this helps,
 Thomas