terrier icon indicating copy to clipboard operation
terrier copied to clipboard

improving the type for ehci_attach_td

Open githwxi opened this issue 10 years ago • 0 comments

fun ehci_attach_td {l: agz} ( usbd: !usb_device, td: &ehci_td_ptr l >> ehci_td_ptr l' // if successful, consumes TD -- else it does not ): #[s: int] #[l': agez | s == 0 || l == l'] status s =

can be improved to

fun ehci_attach_td {l: agz} ( usbd: !usb_device, td: &ehci_td_ptr l >> ehci_td_ptr l' // if successful, consumes TD -- else it does not ): #[s: int;l':addr | (s == 0 && l' == null) || (s > 0 && l' == l)] status s =

githwxi avatar Dec 20 '14 20:12 githwxi