MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Process Control Library Functions                 pspstop(3PROC)



NAME
     pspstop,     pspcontinue,     pslstop,      pslcontinue,
     pslrolltoaddr,   pskill  -  process  and  LWP  control  in
     libthreaddb

SYNOPSIS
     #include 

     pserre pspstop(struct psprochandle *ph);


     pserre pspcontinue(struct psprochandle *ph);


     pserre pslstop(struct psprochandle *ph, lwpidt lwpid);


     pserre pslcontinue(struct psprochandle *ph,
          lwpidt lwpid);


     pserre pslrolltoaddr(struct psprochandle *ph,
          lwpidt lwpid, psaddrt goaddr, psaddrt stopaddr);


     pserre pskill(struct psprochandle *ph, int signum);


DESCRIPTION
     The pspstop() function stops the target process  identified
     by  ph,  while  the  pspcontinue()  function  allows  it to
     resume.


     The libthreaddb() function uses pspstop()  to  freeze  the
     target  process  while  it  is  under inspection. Within the
     scope of any single call  from  outside  libthreaddb  to  a
     libthreaddb  routine, libthreaddb will call pspstop(), at
     most once. If it does, it will  call  pspcontinue()  within
     the scope of the same routine.


     The controlling process may already have stopped the  target
     process  when it calls libthreaddb. In that case, it is not
     obligated to resume the  target  process  when  libthreaddb
     calls  pspcontinue().  In other words, pspstop() is manda-
     tory, while pspcontinue() is  advisory.  After  pspstop(),
     the  target  process  must be stopped; after pspcontinue(),
     the target process may be running.






SunOS 5.11          Last change: 22 Mar 2001                    1






Process Control Library Functions                 pspstop(3PROC)



     The pslstop() and pslcontinue() functions stop and  resume
     a single lightweight process (LWP) within the target process
     ph.


     The pslrolltoaddr() function is used to roll an LWP forward
     out of a critical section when the process is stopped. It is
     also used to run the libthreaddb agent thread on behalf  of
     libthread.  The  pslrolltoaddr()  function is always called
     with the target process stopped, that is, there has  been  a
     preceding call to pspstop(). The specified LWP must be con-
     tinued at the address goaddr, or at its current address  if
     goaddr  is  NUL. It should then be stopped when its execu-
     tion reaches stopaddr. This routine does not  return  until
     the LWP has stopped at stopaddr.


     The pskill() function directs the signal signum to the tar-
     get  process  for  which  the  handle is ph. It has the same
     semantics as kill(2).

RETURN VALUES
     PSOK         The call completed successfully. In  the  case
                   of pspstop(), the target process is stopped.


     PSBADLID     For     pslstop(),     pslcontinue()     and
                   pslrolltoaddr();  there  is  no  LWP  with id
                   lwipd in the target process.


     PSER        The function did not return successfully.


ATRIBUTES
     See attributes(5) for description of  the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT Level                     Safe                        
    


SEE ALSO
     kill(2), libcdb(3LIB), procservice(3PROC),  attributes(5),
     threads(5)





SunOS 5.11          Last change: 22 Mar 2001                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™