Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ttrace_wait(2) [hpux man page]

ttrace_wait(2)							System Calls Manual						    ttrace_wait(2)

NAME
ttrace_wait - wait for ttrace event SYNOPSIS
DESCRIPTION
The system call provides a means to wait for a event to occur. A tracing process (debugger) will normally invoke after a process or any of its threads has been set running. synchronizes tracing requests directed at threads within the traced process. This mechanism differs from the process-oriented synchroniza- tion provided by or (see wait(2)). The pid argument identifies the process-id of a traced process which the debugger expects to stop. If pid is a positive value, and lwpid is zero, then will wait for any thread in the traced process identified by pid to stop in response to an outstanding ttrace event. The information concerning the thread that hit the event point is available in the ttstate_t structure (see ttrace(2)). The lwpid argument identifies the Lightweight Process (LWP) id of a thread in the traced process pid for which the debugger must wait to validate request completion. If both pid and lwpid are non-zero values, suspends the calling process until the specified LWP in the traced process stops. When multiple child processes are simultaneously traced, can be used to identify the process-id and LWP id of a thread which stopped in response to any outstanding request established for the group of traced child processes. This is achieved by invoking with both pid and lwpid set to 0 (zero). A zero pid and non-zero lwpid will return an error. The option argument must specify either or These values control the synchronizing effect of on the calling process. The value causes to behave in non-blocking mode and return to the calling process immediately whether or not a pre-existing ttrace request completed on behalf of the tracing process. With suspends the calling process until the requested pid and/or LWP stop. As mentioned above, the tsp argument references a ttstate_t structure (see ttrace(2)) which provides all the needed information regarding the stopped thread. The size argument specifies the size of the ttstate_t structure referenced by addr. RETURN VALUE
If the call succeeds, will return 1 (one) if the event was never waited for, 0 (zero) otherwise. If the call fails, -1 is returned and is set to the appropriate value. ERRORS
The system call fails if one or more of the following is true: [EINVAL] pid is zero and lwpid is non-zero. [EINVAL] The option is invalid. [EINVAL] The lwpid is not controlled by process pid. [ESRCH] The pid or lwpid do not identify an existing process (LWP). [EACCES] The pid does not identify a process debugged by the invoking process. [ECHILD] The process (LWP) died while it was waited for. [EINTR] was interrupted by a signal. [EFAULT] An invalid address was given for the kernel to write data into. AUTHOR
was developed by HP. SEE ALSO
ttrace(2), wait(2). ttrace_wait(2)

Check Out this Related Man Page

pbind(1M)						  System Administration Commands						 pbind(1M)

NAME
pbind - control and query bindings of processes or LWPs SYNOPSIS
pbind -b processor_id pid [/lwpid]... pbind [-q] [pid [/lwpid]...] pbind -Q [processor_id...] pbind -u pid [/lwpid]... pbind -U [processor_id...] DESCRIPTION
pbind controls and queries bindings of processes and LWPs (lightweight processes) to processors. pbind can also remove processor bindings that were previously established. When an LWP is bound to a processor, it will be executed only by that processor except when the LWP requires a resource that is provided only by another processor. The binding is not exclusive, that is, the processor is free execute other LWPs as well. Bindings are inherited, so new LWPs and processes created by a bound LWP will have the same binding. Binding an interactive shell to a pro- cessor, for example, binds all commands executed by the shell. Superusers may bind or unbind any process or LWP, while other users can bind or unbind any process or LWP for which they have permission to signal, that is, any process that has the same effective user ID as the user. OPTIONS
The following options are supported: -b processor_id Binds all or a subset of the LWPs of the specified processes to the processor processor_id. Specify processor_id as the processor ID of the processor to be controlled or queried. processor_id must be present and on-line. Use the psrinfo command to determine whether or not processor_id is present and on-line. See psrinfo(1M). -q Displays the bindings of the specified processes or of all processes. If a process is composed of multiple LWPs which have different bindings and the LWPs are not explicitly specified, the bindings of only one of the bound LWPs will be displayed. The bindings of a subset of LWPs can be displayed by appending "/lwpids" to the process IDs. Multiple LWPs may be selected using "-" and "," delimiters. See EXAMPLES. -Q Displays the LWPs bound to the specified list of processors, or all LWPs with processor bindings. For processes composed of multiple LWPs, the bindings of individual LWPs will be displayed. -u Removes the bindings of all or a subset of the LWPs of the specified processes, allowing them to be executed on any on-line processor. -U Removes the bindings of all LWPs bound to the specified list of processors, or to any processor if no argument is specified. OPERANDS
The following operands are supported: pid The process ID of the process to be controlled or queried. lwpid The set of LWP IDs of the specified process to be controlled or queried. The syntax for selecting LWP IDs is as follows: 2,3,4-8 LWP IDs 2, 3, and 4 through 8 -4 LWPs whose IDs are 4 or below 4- LWPs whose IDs are 4 or above processor_id The processor ID of the processor to be controlled or queried. EXAMPLES
Example 1: Binding Processes The following example binds processes 204 and 223 to processor 2: example% pbind -b 2 204 223 process id 204: was 2, now 2 process id 223: was 3, now 2 Example 2: Unbinding a Process The following example unbinds process 204: example% pbind -u 204 Example 3: Querying Bindings The following example queries bindings. It demonstrates that process 1 is bound to processor 0, process 149 has at least one LWP bound to CPU3, and process 101 has no bound LWPs. example% pbind -q 1 149 101 process id 1: 0 process id 149: 3 process id 101: not bound Example 4: Querying LWP Bindings The following example queries bindings of LWPs. It demonstrates that LWP 1 of process 149 is bound to CPU3, and LWP 2 of process 149 is not bound. example% pbind -q 149/1-2 lwp id 149/1: 3 lwp id 149/2: not bound Example 5: Querying LWP Bindings for Processor 2: The following example queries all LWPs bound to processor 2: example% pbind -Q 2 lwp id 149/4: 2 lwp id 149/5: 2 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. SEE ALSO
psradm(1M), psrinfo(1M), psrset(1M), processor_bind(2), processor_info(2), sysconf(3C), attributes(5) DIAGNOSTICS
pbind: cannot query pid 31: No suchprocess The process specified did not exist or has exited. pbind: cannot bind pid 31: Not owner The user does not have permission to bind the process. pbind: cannot bind pid 31: Invalid argument The specified processor is not on-line. SunOS 5.10 18 July 2004 pbind(1M)
Man Page