MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Threads Debugging Library Functions        tdtasynciter(3CDB)



NAME
     tdtasynciter, tdtathriter, tdtatsditer  -  iterator
     functions on process handles from libcdb

SYNOPSIS
     cc [ flag... ] file... -lcdb [ library... ]
     #include 
     #include 

     typedef int tdsynciterf(const tdsynchandlet *shp, void *cbdatap);


     typedef int tdthriterf(const tdthrhandlet *thp, void *cbdatap);


     typedef int tdkeyiterf(threadkeyt key, void (*destructor)(), void *cbdatap);


     tderre tdtasynciter(const tdthragentt *tap, tdsynciterf *cb,
          void *cbdatap);


     tderre tdtathriter(const tdthragentt *tap, tdthriterf *cb,
          void *cbdatap, tdthrstatee state, int tipri, sigsett *tisigmaskp,
          unsigned tiuserflags);


     tderre tdtatsditer(const tdthragentt *tap, tdkeyiterf *cb,
          void *cbdatap);


DESCRIPTION
     The      tdtasynciter(),      tdtathriter(),       and
     tdtatsditer()  functions are iterator functions that when
     given a target process handle as an argument, return sets of
     handles  for objects associated with the target process. The
     method is to call back a client-provided function  once  for
     each associated object, passing back a handle as well as the
     client-provided pointer cbdatap. This enables a client  to
     easily build a linked list of the associated objects. If the
     client-provided function  returns  non-zero,  the  iteration
     terminates,  even  if there are members remaining in the set
     of associated objects.


     The tdtasynciter() function returns handles of synchroni-
     zation  objects  (mutexes, readers-writer locks, semaphores,
     and condition variables) associated with  a  process.   Some
     synchronization  objects  might  not be known to libcdb and
     will not be returned. If the  process  has  initialized  the
     synchronization object (by calling mutexinit(3C), for exam-
     ple) or a thread in the process has called a synchronization



SunOS 5.11          Last change: 19 Jun 2001                    1






Threads Debugging Library Functions        tdtasynciter(3CDB)



     primitive  (mutexlock(),  for  example)  using  this object
     after tdtanew(3CDB) was called to attach to  the  process
     and  tdtasynctrackingenable()  was called to enable syn-
     chronization object tracking, then a  handle  for  the  syn-
     chronization object will be passed to the callback function.
     See tdsyncgetinfo(3CDB) for operations that can be  per-
     formed on synchronization object handles.


     The tdtathriter() function returns  handles  for  threads
     that  are part of the target process. For  tdtathriter(),
     the caller specifies several criteria to select a subset  of
     threads  for  which  the callback function should be called.
     Any of these selection criteria may be wild-carded.  If  all
     of them are wild-carded, then handles for all threads in the
     process will be returned.


     The selection parameters and corresponding wild-card  values
     are:

     state (TDTHRANYSTATE):

         Select only  threads  whose  state  matches  state.  See
         tdthrgetinfo(3CDB) for a list of thread states.


     tipri (TDTHRLOWESTPRIORITY):

         Select only threads for which the priority is  at  least
         tipri.


     tisigmaskp (TDSIGNOMASK):

         Select only threads whose signal  mask  exactly  matches
         *tisigmaskp.


     tiuserflags (TDTHRANYUSERFLAGS):

         Select only  threads  whose  user  flags  (specified  at
         thread creation time) exactly match tiuserflags.



     The tdtatsditer() function  returns  the  thread-specific
     data  keys  in  use by the current process.  Thread-specific
     data for a particular thread and key can be obtained by cal-
     ling tdthrtsd(3CDB).





SunOS 5.11          Last change: 19 Jun 2001                    2






Threads Debugging Library Functions        tdtasynciter(3CDB)



RETURN VALUES
     TDOK       The call completed successfully.


     TDBADTA    An invalid process handle was passed.


     TDBER    A call to one of the imported interface routines
                 failed.


     TDER      The call did not complete successfully.


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



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     Safe                        
    


SEE ALSO
     libcdb(3LIB),   mutexinit(3C),    tdsyncgetinfo(3CDB),
     tdthrgetinfo(3CDB), tdthrtsd(3CDB), attributes(5)

























SunOS 5.11          Last change: 19 Jun 2001                    3



OpenSolaris man pages main menu

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