Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/unix/lwt_io.ml
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,6 @@ let of_bytes ~mode bytes =
} in
wrapper

let of_string ~mode str = of_bytes ~mode (Lwt_bytes.of_string str)

let of_fd : type m. ?buffer_size : int -> ?close : (unit -> unit Lwt.t) -> mode : m mode -> Lwt_unix.file_descr -> m channel = fun ?buffer_size ?close ~mode fd ->
let perform_io = match mode with
| Input -> Lwt_bytes.read fd
Expand Down
5 changes: 0 additions & 5 deletions src/unix/lwt_io.mli
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,3 @@ val set_default_buffer_size : int -> unit

@raise Invalid_argument if the given size is smaller than [16]
or greater than [Sys.max_string_length] *)

(**/**)

val of_string : mode : 'mode mode -> string -> 'mode channel
(* Deprecated *)
2 changes: 0 additions & 2 deletions src/unix/lwt_sys.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ exception Not_available of string

let () = Callback.register_exception "lwt:not-available" (Not_available "")

let windows = Sys.win32

type feature =
[ `wait4
| `get_cpu
Expand Down
3 changes: 0 additions & 3 deletions src/unix/lwt_sys.mli
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ exception Not_available of string
(** [Not_available(feature)] is an exception that may be raised when
a feature is not available on the current system. *)

val windows : bool
(** [true] iff running on windows. Deprecated; use [Sys.win32]. *)

(** Features that can be tested. *)
type feature =
[ `wait4
Expand Down
10 changes: 3 additions & 7 deletions src/unix/lwt_unix.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1089,15 +1089,15 @@ let files_of_directory path =

let pipe () =
let (out_fd, in_fd) = Unix.pipe() in
(mk_ch ~blocking:Lwt_sys.windows out_fd, mk_ch ~blocking:Lwt_sys.windows in_fd)
(mk_ch ~blocking:Sys.win32 out_fd, mk_ch ~blocking:Sys.win32 in_fd)

let pipe_in () =
let (out_fd, in_fd) = Unix.pipe() in
(mk_ch ~blocking:Lwt_sys.windows out_fd, in_fd)
(mk_ch ~blocking:Sys.win32 out_fd, in_fd)

let pipe_out () =
let (out_fd, in_fd) = Unix.pipe() in
(out_fd, mk_ch ~blocking:Lwt_sys.windows in_fd)
(out_fd, mk_ch ~blocking:Sys.win32 in_fd)

let mkfifo name perms =
if Sys.win32 then
Expand Down Expand Up @@ -1886,8 +1886,6 @@ type wait_flag =

type resource_usage = { ru_utime : float; ru_stime : float }

let has_wait4 = not Sys.win32

external stub_wait4 : Unix.wait_flag list -> int -> int * Unix.process_status * resource_usage = "lwt_unix_wait4"

let do_wait4 flags pid =
Expand Down Expand Up @@ -1989,8 +1987,6 @@ let system cmd =
| Misc |
+-----------------------------------------------------------------+ *)

let run = Lwt_main.run

let handle_unix_error f x =
Lwt.catch
(fun () -> f x)
Expand Down
8 changes: 0 additions & 8 deletions src/unix/lwt_unix.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1167,11 +1167,3 @@ val get_affinity : ?pid : int -> unit -> int list
val set_affinity : ?pid : int -> int list -> unit
(** [set_affinity ?pid cpus] sets the list of CPUs the given process
is allowed to run on. *)

(**/**)

val run : 'a Lwt.t -> 'a
(* Same as {!Lwt_main.run} *)

val has_wait4 : bool
(* Deprecated, use [Lwt_sys.have `wait4]. *)