search for: 2bdda12

Displaying 1 result from an estimated 1 matches for "2bdda12".

Did you mean: 2bd0a1c
2020 Sep 18
0
[PATCH common] mlutils: Simple wrapper around sysconf (_SC_NPROCESSORS_ONLN).
..._SC_NPROCESSORS_ONLN + long n; + + n = sysconf (_SC_NPROCESSORS_ONLN); + if (n > 0) return Val_int (n); +#endif + /* Return a safe value so that callers don't need to deal with errors. */ + return Val_int (1); +} diff --git a/mlutils/unix_utils.ml b/mlutils/unix_utils.ml index 52eb824..2bdda12 100644 --- a/mlutils/unix_utils.ml +++ b/mlutils/unix_utils.ml @@ -84,3 +84,8 @@ module StatVFS = struct external is_network_filesystem : string -> bool = "guestfs_int_mllib_statvfs_is_network_filesystem" "noalloc" end + +module Sysconf = struct + external nr_proces...