Wolfgang Walter wolfgang.walter@stwm.de writes:
set status field of piosb to STATUS_PENDING before calling wait_on(). If wait_on returns with STATUS_PENDING don't touch piosb.
Reason: if wait_on returns with STATUS_PENDING it started a thread which itself modifies the status field.
In general the iosb is not modified until the operation completes.