DCE for the HP e3000 (B3821-90002)
Programming with Kernel Threads
Process Management Intrinsics
Chapter 5
63
SUSPEND and
ACTIVATE
If a thread invokes SUSPEND (or ACTIVATE) only that thread is suspended. Other
restrictions for suspending a thread are:
• Child waits — A thread is only be permitted to wait for the children it created. An
attempt to wait on a child created by another thread results in an error.
• Father waits — Only the initial thread can issue a father wait. An error is returned to
secondary threads issuing a father wait.
FATHER All threads have the same father, namely the father of the initial thread. If a secondary
thread creates a child process, the father of the child process is the initial thread of the
task.
GETPRIORITY A threaded process can change its own priority. However, an initial thread or a
secondary thread cannot have its priority changed by another process.
GETPROCINFO This works the same with any threaded process.
KILL The children of a task can only be killed by the initial thread. A KILL issued by a
secondary thread returns an error indicating that the thread is not the father of the
child.
PROCTIME This routine returns the CPU time that the thread has accumulated.
SENDMAIL and
RECEIVEMAIL
An error is returned under the following conditions:
• If called from a secondary thread.
• If calling SENDMAIL and sending to a child that is a secondary thread.
• If calling RECEIVEMAIL and receiving from a child that is a secondary thread.
• If calling SENDMAIL and sending to the father and the father is a thread (either
initial or secondary).
• If calling RECEIVEMAIL and receiving from the father and the father is a thread
(either initial or secondary).
TERMINATE and
QUIT
If a thread calls TERMINATE or QUIT, the task, including all of its threads, is terminated.