waitfor_attachname()
Wait for a path within the specified timeout
Synopsis:
waitfor_attachname( "pathname", timeout )
Description:
The waitfor_attachname() function waits for the specified pathname, created by resmgr_attach()/name_attach(), to be accessible within the specified timeout (in milliseconds). The waitfor_attachname() uses kernel notification to be notified when resmgr_attach() registers the name, instead of the polling method used by waitfor_pathname(). If the pathname is not accessible within the timeout, it is assumed that waitfor_attachname() has failed. A resource manager that repeatedly attaches and detaches may delay the determination of success or failure until the timeout expires.
The range for timeout is 0 to
INT_MAX(2147483647).
Not all paths are available to be monitored with waitfor_attachname(). You should ensure that the path works via testing before using waitfor_attachname(). You can use the /proc/mount filesystem to verify that a path works. For more information on this filesystem, refer to the QNX SDP documentation on the /proc/mount directory.
# pidin -p slogger2
pid tid name prio STATE Blocked
49155 1 proc/boot/slogger2 10r RECEIVE 1
# ls -al /proc/mount/dev/slog2
total 3
dr-xr-xr-x 2 root root 1 May 14 15:45 notify
dr-xr-xr-x 2 root root 1 May 14 15:45 stderr
dr-xr-xr-x 2 root root 1 May 14 15:45 stdout
# ls -al /proc/mount/dev/slog2/stdout
total 0
n-w-ww 1 21 21 0 May 14 14:30 0,49155,1,2,0 Notice that under /proc/mount/dev/slog2 there is no ownership node showing that it is an attached point. However, under /proc/mount/dev/slog2/stdout there is an ownership node indicating it is owned by slogger2. If you decode the CSV name of that node, you'll see the second element matches the pid for slogger2 (PID 49155). That shows that /proc/mount/dev/slog2/stdout can be monitored with PLMS but /proc/mount/dev/slog2 cannot be.
Example:
waitfor_attachname("/dev/attach", 1000)
Multiplicity:
Zero or more instances in a task block.
Constraints:
If waitfor_attachname() is used in start_sequence tasks, then the start can be aborted by a stop action during the wait time.
