Hunter Freyer would like Owners Override to review this change.
[zx] Expose signals from zx_object_wait.
Currently, wait and handle_wait in the zx crate only return Signals when
the syscall result is ZX_OK. However, the docs make it clear that the
result is defined when the status is ZX_OK, ZX_ERR_TIMED_OUT, or
ZX_ERR_CANCELED.
ZX_ERR_TIMED_OUT is useful in practice: it's common to wait with an
INFINITE_PAST deadline in order to see the signals currently asserted on
an object.
ZX_ERR_CANCELED is less likely to be useful, but since it's defined
according to the docs, we should probably expose it at this layer.
Bug: 410869980
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Fuchsia-Auto-Submit | +1 |
Hunter FreyerThanks! Agree this is a much more correct API to present. //sdk/rust/zx, //src/lib/fuchsia-async, //src/starnix all LGTM.
I think doing a mechanical translation is probably best but I do see a bunch of places with empty signals being returned on TIMED_OUT -- I wonder if any of those are bugs that we should follow up on.
I think doing a mechanical translation is probably best but I do see a bunch of places with empty signals being returned on TIMED_OUT -- I wonder if any of those are bugs that we should follow up on.
Yeah, there's a number of places that could be improved (and possibly fixed), but right now I'm focusing on making it _possible_ to do the right thing.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[zx] Expose signals from zx_object_wait.
Currently, wait and handle_wait in the zx crate only return Signals when
the syscall result is ZX_OK. However, the docs make it clear that the
result is defined when the status is ZX_OK, ZX_ERR_TIMED_OUT, or
ZX_ERR_CANCELED.
ZX_ERR_TIMED_OUT is useful in practice: it's common to wait with an
INFINITE_PAST deadline in order to see the signals currently asserted on
an object.
ZX_ERR_CANCELED is less likely to be useful, but since it's defined
according to the docs, we should probably expose it at this layer.
Bug: 410869980
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Change has been successfully rolled: http://go/roll-cl/27908b90b606996151e2462dc651e7da42f72073
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |