wakeup cannot access r->sleep once we set r->done because the sleeper might just return at this point making r invalid. make a copy of the sleep rendez pointer before setting r->done.