The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #115 from talex5/sqe_ready

Add Uring.sqe_ready

authored by

Thomas Leonard and committed by
GitHub
de2c0d31 abe34008

+10 -1
+2
lib/uring/uring.ml
··· 567 567 ignore (Heap.ptr job : Uring.id); (* Check it's still valid *) 568 568 with_id t (fun id -> Uring.submit_cancel t.uring id (Heap.ptr job)) user_data 569 569 570 + let sqe_ready t = Uring.sq_ready t.uring 571 + 570 572 (* Free stale entries in the sketch buffer, if possible. 571 573 This isn't quite right: a busy system might never have 0 unsubmitted entries. 572 574 We should probably track how many requests need to be submitted before each
+3
lib/uring/uring.mli
··· 666 666 (** [active_ops t] returns the number of operations added to the ring (whether submitted or not) 667 667 for which the completion event has not yet been collected. *) 668 668 669 + val sqe_ready : _ t -> int 670 + (** [sqe_ready t] is the number of unconsumed (if SQPOLL) or unsubmitted entries in the SQ ring. *) 671 + 669 672 module Stats : sig 670 673 type t = { 671 674 sqe_ready : int; (** SQEs not yet submitted. *)
+5 -1
lib/uring/uring_stubs.c
··· 157 157 value /* noalloc */ 158 158 ocaml_uring_sq_ready(value v_uring) { 159 159 struct io_uring *ring = Ring_val(v_uring); 160 - return (Val_int(io_uring_sq_ready(ring))); 160 + if (ring) { 161 + return Val_int(io_uring_sq_ready(ring)); 162 + } else { 163 + return Val_int(0); 164 + } 161 165 } 162 166 163 167 value /* noalloc */