def CapSet.subset

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

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

289# a within b: no bit of a outside b (on the low word, a & ~b == 0)
290def CapSet.subset(a: CapSet(), b: CapSet()) -> Bool:
291  match a b:
292    case CapSetW{al, ah} CapSetW{bl, bh}:
293      Bool.and(U32.is_eq(U32.and(al, U32.not(bl)), 0), CapBits.subset(9n, ah, bh))

Uses (8)

Used by (64)