As described in Section 10.1.1 the winfo array
variable stores the various pointer to the wait_info objects of
a process. winfo is an array of winfo_item elements.
wait_item is defined as follows:
class winfo_item {
union _data { wait_info *wi; winfo_item *wii; };
_data data;
public:
winfo_item() { data.wi = NULL; data.wii = NULL; }
operator wait_info*() { return data.wi; }
operator winfo_item*() { return data.wii; }
winfo_item &operator=(wait_info *a) {
data.wi = a; return *this;
}
winfo_item &operator=(winfo_item *a) {
data.wii = a; return *this;
}
};
Hence, a array element of type winfo_item may store a pointer
to a wait_info object or a pointer to a winfo_item
list. This structure is useful to deal with procedures that contain
wait statements. Procedures which include wait statements will take a
reference to an element of the winfo array as an argument. This
element will store a pointer to a separate new winfo array
which in turn contains references to all wait_info objects used
within the procedure.