thesis: Re-write xwaitq