module Fd : Raw_fd
module Watching : Fd.Watching
module Signal : Core.Std.Signal
module Timerfd : Core.Std.Linux_ext.Timerfd
val debug : bool
module File_descr_watcher : sig .. end
module type S = sig .. end
include File_descr_watcher_intf.S
val watcher : t
type t = (module S)
val sexp_of_t : (module S) -> Sexplib.Sexp.t
type 'a with_options = 'a Import.Kernel_scheduler.with_options
include sig .. end
val preserve_execution_context : ('a -> unit) -> ('a -> unit) Core.Std.Staged.t
val preserve_execution_context' : ('a -> 'b Async_kernel.Deferred.t) ->
('a -> 'b Async_kernel.Deferred.t) Core.Std.Staged.t
val schedule : ((unit -> unit) -> unit) Import.Kernel_scheduler.with_options
val schedule' : ((unit -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t)
Import.Kernel_scheduler.with_options
val within : ((unit -> unit) -> unit) Import.Kernel_scheduler.with_options
val within' : ((unit -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t)
Import.Kernel_scheduler.with_options
val within_context : Async_kernel.Execution_context.t ->
(unit -> 'a) -> ('a, unit) Core.Std.Result.t
val within_v : ((unit -> 'a) -> 'a option) Import.Kernel_scheduler.with_options
val find_local : 'a Core.Std.Univ_map.Key.t -> 'a option
val with_local : 'a Core.Std.Univ_map.Key.t -> 'a option -> f:(unit -> 'b) -> 'b
val cycle_count : unit -> int
val cycle_start : unit -> Core.Std.Time.t
val cycle_times : unit -> Core.Std.Time.Span.t Async_kernel.Async_stream.t
val set_max_num_jobs_per_priority_per_cycle : int -> unit
val force_current_cycle_to_end : unit -> unit
type t = {
mutex : Core.Std.Nano_mutex.t;
mutable is_running : bool;
mutable have_called_go : bool;
mutable fds_whose_watching_has_changed : Fd.t list;
file_descr_watcher : File_descr_watcher.t;
fd_by_descr : Fd_by_descr.t;
mutable timerfd : Core.Std.Linux_ext.Timerfd.t option;
mutable scheduler_thread_id : int;
interruptor : Interruptor.t;
signal_manager : Raw_signal_manager.t;
thread_pool : Thread_pool.t;
mutable handle_thread_pool_stuck : stuck_for:Core.Std.Time.Span.t -> unit;
busy_pollers : Busy_pollers.t;
mutable busy_poll_thread_is_running : bool;
mutable next_tsc_calibration : Core.Std.Time_stamp_counter.t;
kernel_scheduler : Import.Kernel_scheduler.t;
mutable max_inter_cycle_timeout : Import.Max_inter_cycle_timeout.t;
}
val sexp_of_t : t -> Sexplib.Sexp.t
val max_inter_cycle_timeout : t -> Import.Max_inter_cycle_timeout.t
val set_max_inter_cycle_timeout : t -> Import.Max_inter_cycle_timeout.t -> unit
val kernel_scheduler : t -> Import.Kernel_scheduler.t
val next_tsc_calibration : t -> Core.Std.Time_stamp_counter.t
val set_next_tsc_calibration : t -> Core.Std.Time_stamp_counter.t -> unit
val busy_poll_thread_is_running : t -> bool
val set_busy_poll_thread_is_running : t -> bool -> unit
val busy_pollers : t -> Busy_pollers.t
val handle_thread_pool_stuck : t -> stuck_for:Core.Std.Time.Span.t -> unit
val set_handle_thread_pool_stuck : t -> (stuck_for:Core.Std.Time.Span.t -> unit) -> unit
val thread_pool : t -> Thread_pool.t
val signal_manager : t -> Raw_signal_manager.t
val interruptor : t -> Interruptor.t
val scheduler_thread_id : t -> int
val set_scheduler_thread_id : t -> int -> unit
val timerfd : t -> Core.Std.Linux_ext.Timerfd.t option
val set_timerfd : t -> Core.Std.Linux_ext.Timerfd.t option -> unit
val fd_by_descr : t -> Fd_by_descr.t
val file_descr_watcher : t -> File_descr_watcher.t
val fds_whose_watching_has_changed : t -> Fd.t list
val set_fds_whose_watching_has_changed : t -> Fd.t list -> unit
val have_called_go : t -> bool
val set_have_called_go : t -> bool -> unit
val is_running : t -> bool
val set_is_running : t -> bool -> unit
val mutex : t -> Core.Std.Nano_mutex.t
module Fields : sig .. end
val names : string list
val max_inter_cycle_timeout : ([< `Read | `Set_and_create ], t, Import.Max_inter_cycle_timeout.t)
Fieldslib.Field.t_with_perm
val kernel_scheduler : ([< `Read | `Set_and_create ], t, Import.Kernel_scheduler.t)
Fieldslib.Field.t_with_perm
val next_tsc_calibration : ([< `Read | `Set_and_create ], t, Core.Std.Time_stamp_counter.t)
Fieldslib.Field.t_with_perm
val busy_poll_thread_is_running : ([< `Read | `Set_and_create ], t, bool) Fieldslib.Field.t_with_perm
val busy_pollers : ([< `Read | `Set_and_create ], t, Busy_pollers.t) Fieldslib.Field.t_with_perm
val handle_thread_pool_stuck : ([< `Read | `Set_and_create ], t, stuck_for:Core.Std.Time.Span.t -> unit)
Fieldslib.Field.t_with_perm
val thread_pool : ([< `Read | `Set_and_create ], t, Thread_pool.t) Fieldslib.Field.t_with_perm
val signal_manager : ([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
Fieldslib.Field.t_with_perm
val interruptor : ([< `Read | `Set_and_create ], t, Interruptor.t) Fieldslib.Field.t_with_perm
val scheduler_thread_id : ([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm
val timerfd : ([< `Read | `Set_and_create ], t, Core.Std.Linux_ext.Timerfd.t option)
Fieldslib.Field.t_with_perm
val fd_by_descr : ([< `Read | `Set_and_create ], t, Fd_by_descr.t) Fieldslib.Field.t_with_perm
val file_descr_watcher : ([< `Read | `Set_and_create ], t, File_descr_watcher.t)
Fieldslib.Field.t_with_perm
val fds_whose_watching_has_changed : ([< `Read | `Set_and_create ], t, Fd.t list) Fieldslib.Field.t_with_perm
val have_called_go : ([< `Read | `Set_and_create ], t, bool) Fieldslib.Field.t_with_perm
val is_running : ([< `Read | `Set_and_create ], t, bool) Fieldslib.Field.t_with_perm
val mutex : ([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
Fieldslib.Field.t_with_perm
val make_creator : mutex:(([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm ->
       'a -> ('b -> Core.Std.Nano_mutex.t) * 'c) ->
is_running:(([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> 'c -> ('b -> bool) * 'd) ->
have_called_go:(([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> 'd -> ('b -> bool) * 'e) ->
fds_whose_watching_has_changed:(([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm ->
                                'e -> ('b -> Fd.t list) * 'f) ->
file_descr_watcher:(([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm ->
                    'f -> ('b -> File_descr_watcher.t) * 'g) ->
fd_by_descr:(([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> 'g -> ('b -> Fd_by_descr.t) * 'h) ->
timerfd:(([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm ->
         'h -> ('b -> Core.Std.Linux_ext.Timerfd.t option) * 'i) ->
scheduler_thread_id:(([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> 'i -> ('b -> int) * 'j) ->
interruptor:(([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> 'j -> ('b -> Interruptor.t) * 'k) ->
signal_manager:(([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm ->
                'k -> ('b -> Raw_signal_manager.t) * 'l) ->
thread_pool:(([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> 'l -> ('b -> Thread_pool.t) * 'm) ->
handle_thread_pool_stuck:(([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm ->
                          'm ->
                          ('b -> stuck_for:Core.Std.Time.Span.t -> unit) * 'n) ->
busy_pollers:(([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm ->
              'n -> ('b -> Busy_pollers.t) * 'o) ->
busy_poll_thread_is_running:(([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm ->
                             'o -> ('b -> bool) * 'p) ->
next_tsc_calibration:(([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm ->
                      'p -> ('b -> Core.Std.Time_stamp_counter.t) * 'q) ->
kernel_scheduler:(([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm ->
                  'q -> ('b -> Import.Kernel_scheduler.t) * 'r) ->
max_inter_cycle_timeout:(([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm ->
                         'r -> ('b -> Import.Max_inter_cycle_timeout.t) * 's) ->
'a -> ('b -> t) * 's
val create : mutex:Core.Std.Nano_mutex.t ->
is_running:bool ->
have_called_go:bool ->
fds_whose_watching_has_changed:Fd.t list ->
file_descr_watcher:File_descr_watcher.t ->
fd_by_descr:Fd_by_descr.t ->
timerfd:Core.Std.Linux_ext.Timerfd.t option ->
scheduler_thread_id:int ->
interruptor:Interruptor.t ->
signal_manager:Raw_signal_manager.t ->
thread_pool:Thread_pool.t ->
handle_thread_pool_stuck:(stuck_for:Core.Std.Time.Span.t -> unit) ->
busy_pollers:Busy_pollers.t ->
busy_poll_thread_is_running:bool ->
next_tsc_calibration:Core.Std.Time_stamp_counter.t ->
kernel_scheduler:Import.Kernel_scheduler.t ->
max_inter_cycle_timeout:Import.Max_inter_cycle_timeout.t -> t
val map : mutex:(([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm -> Core.Std.Nano_mutex.t) ->
is_running:(([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> bool) ->
have_called_go:(([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> bool) ->
fds_whose_watching_has_changed:(([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm -> Fd.t list) ->
file_descr_watcher:(([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm -> File_descr_watcher.t) ->
fd_by_descr:(([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> Fd_by_descr.t) ->
timerfd:(([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm -> Core.Std.Linux_ext.Timerfd.t option) ->
scheduler_thread_id:(([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> int) ->
interruptor:(([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> Interruptor.t) ->
signal_manager:(([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm -> Raw_signal_manager.t) ->
thread_pool:(([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> Thread_pool.t) ->
handle_thread_pool_stuck:(([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm ->
                          stuck_for:Core.Std.Time.Span.t -> unit) ->
busy_pollers:(([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm -> Busy_pollers.t) ->
busy_poll_thread_is_running:(([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm -> bool) ->
next_tsc_calibration:(([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm ->
                      Core.Std.Time_stamp_counter.t) ->
kernel_scheduler:(([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm -> Import.Kernel_scheduler.t) ->
max_inter_cycle_timeout:(([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm ->
                         Import.Max_inter_cycle_timeout.t) ->
t
val iter : mutex:(([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm -> 'a) ->
is_running:(([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> 'b) ->
have_called_go:(([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> 'c) ->
fds_whose_watching_has_changed:(([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm -> 'd) ->
file_descr_watcher:(([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm -> 'e) ->
fd_by_descr:(([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> 'f) ->
timerfd:(([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm -> 'g) ->
scheduler_thread_id:(([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> 'h) ->
interruptor:(([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> 'i) ->
signal_manager:(([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm -> 'j) ->
thread_pool:(([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> 'k) ->
handle_thread_pool_stuck:(([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm -> 'l) ->
busy_pollers:(([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm -> 'm) ->
busy_poll_thread_is_running:(([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm -> 'n) ->
next_tsc_calibration:(([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm -> 'o) ->
kernel_scheduler:(([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm -> 'p) ->
max_inter_cycle_timeout:(([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm -> 'q) ->
'q
val fold : init:'a ->
mutex:('a ->
       ([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm -> 'b) ->
is_running:('b ->
            ([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> 'c) ->
have_called_go:('c ->
                ([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> 'd) ->
fds_whose_watching_has_changed:('d ->
                                ([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm -> 'e) ->
file_descr_watcher:('e ->
                    ([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm -> 'f) ->
fd_by_descr:('f ->
             ([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> 'g) ->
timerfd:('g ->
         ([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm -> 'h) ->
scheduler_thread_id:('h ->
                     ([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> 'i) ->
interruptor:('i ->
             ([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> 'j) ->
signal_manager:('j ->
                ([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm -> 'k) ->
thread_pool:('k ->
             ([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> 'l) ->
handle_thread_pool_stuck:('l ->
                          ([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm -> 'm) ->
busy_pollers:('m ->
              ([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm -> 'n) ->
busy_poll_thread_is_running:('n ->
                             ([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm -> 'o) ->
next_tsc_calibration:('o ->
                      ([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm -> 'p) ->
kernel_scheduler:('p ->
                  ([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm -> 'q) ->
max_inter_cycle_timeout:('q ->
                         ([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm -> 'r) ->
'r
val map_poly : ([< `Read | `Set_and_create ], t, 'a) Fieldslib.Field.user -> 'a list
val for_all : mutex:(([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm -> bool) ->
is_running:(([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> bool) ->
have_called_go:(([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> bool) ->
fds_whose_watching_has_changed:(([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm -> bool) ->
file_descr_watcher:(([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm -> bool) ->
fd_by_descr:(([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> bool) ->
timerfd:(([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm -> bool) ->
scheduler_thread_id:(([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> bool) ->
interruptor:(([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> bool) ->
signal_manager:(([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm -> bool) ->
thread_pool:(([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> bool) ->
handle_thread_pool_stuck:(([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm -> bool) ->
busy_pollers:(([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm -> bool) ->
busy_poll_thread_is_running:(([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm -> bool) ->
next_tsc_calibration:(([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm -> bool) ->
kernel_scheduler:(([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm -> bool) ->
max_inter_cycle_timeout:(([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm -> bool) ->
bool
val exists : mutex:(([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm -> bool) ->
is_running:(([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> bool) ->
have_called_go:(([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> bool) ->
fds_whose_watching_has_changed:(([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm -> bool) ->
file_descr_watcher:(([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm -> bool) ->
fd_by_descr:(([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> bool) ->
timerfd:(([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm -> bool) ->
scheduler_thread_id:(([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> bool) ->
interruptor:(([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> bool) ->
signal_manager:(([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm -> bool) ->
thread_pool:(([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> bool) ->
handle_thread_pool_stuck:(([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm -> bool) ->
busy_pollers:(([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm -> bool) ->
busy_poll_thread_is_running:(([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm -> bool) ->
next_tsc_calibration:(([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm -> bool) ->
kernel_scheduler:(([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm -> bool) ->
max_inter_cycle_timeout:(([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm -> bool) ->
bool
val to_list : mutex:(([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm -> 'a) ->
is_running:(([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> 'a) ->
have_called_go:(([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> 'a) ->
fds_whose_watching_has_changed:(([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm -> 'a) ->
file_descr_watcher:(([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm -> 'a) ->
fd_by_descr:(([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> 'a) ->
timerfd:(([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm -> 'a) ->
scheduler_thread_id:(([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> 'a) ->
interruptor:(([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> 'a) ->
signal_manager:(([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm -> 'a) ->
thread_pool:(([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> 'a) ->
handle_thread_pool_stuck:(([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm -> 'a) ->
busy_pollers:(([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm -> 'a) ->
busy_poll_thread_is_running:(([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm -> 'a) ->
next_tsc_calibration:(([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm -> 'a) ->
kernel_scheduler:(([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm -> 'a) ->
max_inter_cycle_timeout:(([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm -> 'a) ->
'a list
module Direct : sig .. end
val iter : t ->
mutex:(([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm -> t -> Core.Std.Nano_mutex.t -> 'a) ->
is_running:(([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> t -> bool -> 'b) ->
have_called_go:(([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> t -> bool -> 'c) ->
fds_whose_watching_has_changed:(([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm ->
                                t -> Fd.t list -> 'd) ->
file_descr_watcher:(([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm ->
                    t -> File_descr_watcher.t -> 'e) ->
fd_by_descr:(([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> t -> Fd_by_descr.t -> 'f) ->
timerfd:(([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm ->
         t -> Core.Std.Linux_ext.Timerfd.t option -> 'g) ->
scheduler_thread_id:(([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> t -> int -> 'h) ->
interruptor:(([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> t -> Interruptor.t -> 'i) ->
signal_manager:(([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm ->
                t -> Raw_signal_manager.t -> 'j) ->
thread_pool:(([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> t -> Thread_pool.t -> 'k) ->
handle_thread_pool_stuck:(([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm ->
                          t -> (stuck_for:Core.Std.Time.Span.t -> unit) -> 'l) ->
busy_pollers:(([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm -> t -> Busy_pollers.t -> 'm) ->
busy_poll_thread_is_running:(([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm -> t -> bool -> 'n) ->
next_tsc_calibration:(([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm ->
                      t -> Core.Std.Time_stamp_counter.t -> 'o) ->
kernel_scheduler:(([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm ->
                  t -> Import.Kernel_scheduler.t -> 'p) ->
max_inter_cycle_timeout:(([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm ->
                         t -> Import.Max_inter_cycle_timeout.t -> 'q) ->
'q
val fold : t ->
init:'a ->
mutex:('a ->
       ([< `Read | `Set_and_create ], t, Core.Std.Nano_mutex.t)
       Fieldslib.Field.t_with_perm -> t -> Core.Std.Nano_mutex.t -> 'b) ->
is_running:('b ->
            ([< `Read | `Set_and_create ], t, bool)
            Fieldslib.Field.t_with_perm -> t -> bool -> 'c) ->
have_called_go:('c ->
                ([< `Read | `Set_and_create ], t, bool)
                Fieldslib.Field.t_with_perm -> t -> bool -> 'd) ->
fds_whose_watching_has_changed:('d ->
                                ([< `Read | `Set_and_create ], t, Fd.t list)
                                Fieldslib.Field.t_with_perm ->
                                t -> Fd.t list -> 'e) ->
file_descr_watcher:('e ->
                    ([< `Read | `Set_and_create ], t, File_descr_watcher.t)
                    Fieldslib.Field.t_with_perm ->
                    t -> File_descr_watcher.t -> 'f) ->
fd_by_descr:('f ->
             ([< `Read | `Set_and_create ], t, Fd_by_descr.t)
             Fieldslib.Field.t_with_perm -> t -> Fd_by_descr.t -> 'g) ->
timerfd:('g ->
         ([< `Read | `Set_and_create ], t,
          Core.Std.Linux_ext.Timerfd.t option)
         Fieldslib.Field.t_with_perm ->
         t -> Core.Std.Linux_ext.Timerfd.t option -> 'h) ->
scheduler_thread_id:('h ->
                     ([< `Read | `Set_and_create ], t, int)
                     Fieldslib.Field.t_with_perm -> t -> int -> 'i) ->
interruptor:('i ->
             ([< `Read | `Set_and_create ], t, Interruptor.t)
             Fieldslib.Field.t_with_perm -> t -> Interruptor.t -> 'j) ->
signal_manager:('j ->
                ([< `Read | `Set_and_create ], t, Raw_signal_manager.t)
                Fieldslib.Field.t_with_perm ->
                t -> Raw_signal_manager.t -> 'k) ->
thread_pool:('k ->
             ([< `Read | `Set_and_create ], t, Thread_pool.t)
             Fieldslib.Field.t_with_perm -> t -> Thread_pool.t -> 'l) ->
handle_thread_pool_stuck:('l ->
                          ([< `Read | `Set_and_create ], t,
                           stuck_for:Core.Std.Time.Span.t -> unit)
                          Fieldslib.Field.t_with_perm ->
                          t -> (stuck_for:Core.Std.Time.Span.t -> unit) -> 'm) ->
busy_pollers:('m ->
              ([< `Read | `Set_and_create ], t, Busy_pollers.t)
              Fieldslib.Field.t_with_perm -> t -> Busy_pollers.t -> 'n) ->
busy_poll_thread_is_running:('n ->
                             ([< `Read | `Set_and_create ], t, bool)
                             Fieldslib.Field.t_with_perm -> t -> bool -> 'o) ->
next_tsc_calibration:('o ->
                      ([< `Read | `Set_and_create ], t,
                       Core.Std.Time_stamp_counter.t)
                      Fieldslib.Field.t_with_perm ->
                      t -> Core.Std.Time_stamp_counter.t -> 'p) ->
kernel_scheduler:('p ->
                  ([< `Read | `Set_and_create ], t,
                   Import.Kernel_scheduler.t)
                  Fieldslib.Field.t_with_perm ->
                  t -> Import.Kernel_scheduler.t -> 'q) ->
max_inter_cycle_timeout:('q ->
                         ([< `Read | `Set_and_create ], t,
                          Import.Max_inter_cycle_timeout.t)
                         Fieldslib.Field.t_with_perm ->
                         t -> Import.Max_inter_cycle_timeout.t -> 'r) ->
'r
val current_execution_context : t -> Async_kernel.Execution_context.t
val with_execution_context : t -> Async_kernel.Execution_context.t -> f:(unit -> 'a) -> 'a
val create_fd : ?avoid_nonblock_if_possible:bool ->
t -> Fd.Kind.t -> Fd.File_descr.t -> Core.Std.Info.t -> Fd.t
val lock : t -> unit
val try_lock : t -> bool
val unlock : t -> unit
val with_lock : t -> (unit -> 'a) -> 'a
val am_holding_lock : t -> bool
type the_one_and_only = 
|Not_ready_to_initialize
|Ready_to_initialize of unit -> t
|Initialized of t
val mutex_for_initializing_the_one_and_only_ref : Core.Std.Nano_mutex.t
val the_one_and_only_ref : the_one_and_only ref
val is_ready_to_initialize : unit -> bool
val the_one_and_only_uncommon_case : should_lock:bool -> t
val the_one_and_only : should_lock:bool -> t
val current_thread_id : unit -> int
val is_main_thread : unit -> bool
val remove_fd : t -> Raw_fd.t -> unit
val maybe_start_closing_fd : t -> Fd.t -> unit
val dec_num_active_syscalls_fd : t -> Fd.t -> unit
val invariant : t -> unit
val update_check_access : t -> bool -> unit
val try_create_timerfd : unit -> Timerfd.t option
val default_handle_thread_pool_stuck : stuck_for:Core.Std.Time.Span.t -> unit
val detect_stuck_thread_pool : t -> unit
val create : ?file_descr_watcher:Import.Config.File_descr_watcher.t ->
?max_num_open_file_descrs:Import.Config.Max_num_open_file_descrs.t ->
?max_num_threads:Import.Config.Max_num_threads.t -> unit -> t
val init : unit -> unit
val reset_in_forked_process : unit -> unit
val thread_safe_wakeup_scheduler : t -> unit
val thread_safe_enqueue_external_action : t -> (unit -> unit) -> unit
val i_am_the_scheduler : t -> bool
val have_lock_do_cycle : t -> unit
val set_fd_desired_watching : t -> Fd.t -> Read_write.Key.t -> Fd.Watching.t -> unit
val request_start_watching : t ->
Fd.t ->
Read_write.Key.t ->
Fd.Watching.t ->
[> `Already_closed | `Already_watching | `Unsupported | `Watching ]
val request_stop_watching : t -> Fd.t -> Read_write.Key.t -> Fd.ready_to_result -> unit
val sync_changed_fds_to_file_descr_watcher : t -> unit
val maybe_calibrate_tsc : t -> unit
val create_job : ?execution_context:Async_kernel.Execution_context.t ->
t -> ('a -> unit) -> 'a -> Async_kernel.Jobs.Job.t
val be_the_scheduler : ?raise_unhandled_exn:bool -> t -> 'a
val add_finalizer : t -> 'a Core.Std.Heap_block.t -> ('a Core.Std.Heap_block.t -> unit) -> unit
val add_finalizer_exn : t -> 'a -> ('a -> unit) -> unit
val go : ?raise_unhandled_exn:bool -> unit -> Core_kernel.Std.never_returns
val go_main : ?raise_unhandled_exn:bool ->
?file_descr_watcher:Import.Config.File_descr_watcher.t ->
?max_num_open_file_descrs:int ->
?max_num_threads:int ->
main:(unit -> unit) -> unit -> Core_kernel.Std.never_returns
val is_running : unit -> bool
val report_long_cycle_times : ?cutoff:Core.Time.Span.t -> unit -> unit
val set_check_invariants : bool -> unit
val set_detect_invalid_access_from_thread : bool -> unit
val set_record_backtraces : bool -> unit
val set_max_inter_cycle_timeout : Core.Std.Time.Span.t -> unit
val start_busy_poller_thread_if_not_running : t -> unit
val add_busy_poller : (unit -> [ `Continue_polling | `Stop_polling of 'a ]) -> 'a Import.Deferred.t
type 'b folder = {
folder : 'a. 'b -> t -> (t, 'a) Core.Std.Field.t -> 'b;
}
val t : unit -> t
val fold_fields : init:'a -> 'a folder -> 'a
val handle_thread_pool_stuck : (stuck_for:Core.Std.Time.Span.t -> unit) -> unit