30 L4_error(Error_code ec = None, Phase p = Snd) : _raw(ec | p) {}
31 L4_error(L4_error const &e, Phase p = Snd) : _raw(e._raw | p) {}
33 bool ok() const { return _raw == 0; }
35 Error_code error() const { return Error_code(_raw & 0x1e); }
36 Mword raw() const { return _raw; }
37 bool snd_phase() const { return !(_raw & Rcv); }
39 static L4_error from_raw(Mword raw) { return L4_error(true, raw); }
42 L4_error(bool, Mword raw) : _raw(raw) {}
47 //----------------------------------------------------------------------------
48 IMPLEMENTATION [debug]:
50 static char const *__errors[] =
51 { "OK", "timeout", "not existent", "canceled", "overflow",
52 "xfer snd", "xfer rcv", "aborted", "map failed" };
60 return __errors[(_raw >> 1) & 0xf];