wavefront_status
if ((wavefront_status(dev) & (STAT_INTR_READ|STAT_INTR_WRITE)) == 0) {
if (wavefront_status (dev) & mask) {