thr_continue man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]



thr_continue(3scl)					    thr_continue(3scl)

NAME
       thr_continue - Continues execution of a suspended thread.

LIBRARY
       SCL Threads Library (libthread.so)

SYNOPSIS
       #include <thread.h>

       int thr_continue(
			 thread_t target_thread );

PARAMETERS
       Identifier of the thread to be resumed.

DESCRIPTION
       This  routine causes the specified target_thread to continue its execu‐
       tion. If the thread was suspended, then the thread resumes  its	execu‐
       tion. If the thread was not suspended, then this call has no effect.

SCL IMPLEMENTATION NOTES
       POSIX  threads  does  not support suspending and continueing a thread's
       execution.  Thus thr_continue(3scl) is implemented by sending a	signal
       to the target thread by calling pthread_kill(3).

       The  SCL	 thread library maintains state information for each thread to
       ensure that only non-suspended threads are sent the suspend signal, and
       that  only  suspended threads are sent the continue signal. This avoids
       the potential problem of a thread having both suspend &	continue  sig‐
       nals  pending,  where  the  order  of the signals is indeterminate. The
       receipt of the continue-signal causes the suspended  thread  to	return
       from  the signal-handler for the suspend signal, and thus resume execu‐
       tion.

       thr_continue(3scl) does not return until	 it  receives  acknowledgement
       from  the   suspended  thread that it has received the continue signal.
       Solaris does not require nor document this behaviour:  it  is  done  to
       ensure the thread state information maintained within SCL is correct.

       By  default  SCL	 uses  the  SIGUSR1  signal for thr_suspend(3scl), and
       SIGUSR2 for thr_continue(3scl). However, these signals may be  used  by
       applications  for  their	 own  purposes, and so SCL enables the user to
       specify alternate signals to be used for thr_suspend(3scl) and thr_con‐
       tinue(3scl).  This  is  achieved	 by  setting the environment variables
       STL_SIG_SUSPEND and STL_SIG_CONTINUE to the integer values of  alterna‐
       tive  signals  before running the application program.  The signals and
       their values are listed in the man-page for signal(4), and in the  file
       /usr/include/signal.h.

       E.g. to use SIGXFSZ as the continue signal, where SIGXFSZ is defined as
       value 25 in /usr/include/signal.h, issue a command like:

	    csh>  setenv STL_SIG_CONTINUE 25

RETURN VALUES
       If an error condition occurs, this routine  returns  an	integer	 value
       indicating the type of error.

       Additional  error  return  information  may be written to the SCL error
       log.  Refer to scl_error_log(4scl) for details.

       Possible return values are as  follows:	Successful  completion.	  tar‐
       get_thread  specifies a non-existant thread ID.	target_thread has ter‐
       minated and  thr_join(3scl)  must  be  called  on  it  to  reclaim  its
       resources.

ERRORS
       None.

RELATED INFORMATION
       Functions:  pthread_kill(3),  scl_intro(3scl),  scl_thread_intro(3scl),
       thr_create(3scl), thr_suspend(3scl)

       Files: scl_error_log(4scl), signal(4)

       Manuals: Solaris Compatibility Libraries User's Guide

							    thr_continue(3scl)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net