def CapSet.minus

bend-osdev-caps@0.1.0.0 · caps.bend:283

import bend-osdev-caps@0.1.0.0/caps.bend as Caps
import Base

283# the capabilities of a not in b
284def CapSet.minus(a: CapSet(), b: CapSet()) -> CapSet():
285  match a b:
286    case CapSetW{al, ah} CapSetW{bl, bh}:
287      CapSetW{U32.and(al, U32.not(bl)), Word.and(9n, ah, Word.not(9n, bh))}

Uses (6)

Used by (4)