From a758aac39aa330911f5f589ab3cae1bebed1e9ce Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Sat, 10 Jun 2017 04:12:11 +0200 Subject: [stm] Move process_id to Spawned. This brings us one step closer to actually moving all STM flags to `stm`. --- stm/spawned.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'stm/spawned.ml') diff --git a/stm/spawned.ml b/stm/spawned.ml index 6ab096abf9..fb5708f3a3 100644 --- a/stm/spawned.ml +++ b/stm/spawned.ml @@ -73,3 +73,9 @@ let get_channels () = Printf.eprintf "Fatal error: ideslave communication channels not set.\n"; exit 1 | Some(ic, oc) -> ic, oc + +let process_id () = + Printf.sprintf "%d:%s:%d" (Unix.getpid ()) + (if Flags.async_proofs_is_worker () then !Flags.async_proofs_worker_id + else "master") + (Thread.id (Thread.self ())) -- cgit v1.2.3