func _chan_ctl(handle: Int, op: Int) -> IntOps: 0 status (0 value ready, 1 empty and open, 2 closed and drained), 1 retain sender, 2 drop sender, 3 drop receiver, 4 register an external wait, 5 unregister, 6 park, 7 create (the handle operand carries the capacity; 0 = unbounded), 8 count this worker's external waits, 9 whether the receiver is still live, 10 atomically reserve a send slot (1 on success), 11 register a send-wait, 12 unregister one, 13 monotonic now (ns), 14 register a deadline (the handle operand, absolute ns), 15 unregister one.
View Source
pub func _chan_ctl(handle: Int, op: Int) -> Int {
#_ir(handle, op) { %? = chan_ctl $0 $1 }
}