Add spawn, spawn_with_caps and span calls to the Process Manager API.
[barrelfish] / if / spawn.if
index b183cbd..cf1ea52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, ETH Zurich.
  * All rights reserved.
  *
  * This file is distributed under the terms in the attached LICENSE file.
@@ -8,7 +8,70 @@
  */
 
 interface spawn "Interface to spawn domains" {
-    rpc spawn_domain(in string path, in char argvbuf[argvbytes], in char envbuf[envbytes],
-                     out errval err, out domainid domain_id);
+    typedef struct {
+    uint8 status;
+    } ps_entry;
+
+    rpc spawn_domain(in String path[2048], in char argvbuf[argvbytes, 2048], in char envbuf[envbytes, 2048],
+                     in uint8 flags, out errval err, out domainid domain_id);
+
+    rpc spawn_domain_with_caps(in String path[2048], in char argvbuf[argvbytes, 2048],
+                               in char envbuf[envbytes, 2048], in cap inheritcn_cap,
+                               in cap argcn_cap, in uint8 flags, out errval err,
+                               out domainid domain_id);
+
+    // Messages for the async interface with the process manager.
+    message spawn_request(cap domain_cap,
+                          String path[2048],
+                          char argvbuf[argvbytes, 2048],
+                          char envbuf[envbytes, 2048],
+                          uint8 flags);
+    message spawn_with_caps_request(cap domain_cap,
+                                    String path[2048],
+                                    char argvbuf[argvbytes, 2048],
+                                    char envbuf[envbytes, 2048],
+                                    cap inheritcn_cap,
+                                    cap argcn_cap,
+                                    uint8 flags);
+    message span_request(cap domain_cap, cap vroot, cap dispframe);
+    message kill_request(cap domain_cap);
+    message spawn_reply(cap domain_cap, errval err);
+
+    rpc spawn_proc_mgmt_domain(in cap domain_cap,
+                               in String path[2048],
+                               in char argvbuf[argvbytes, 2048],
+                               in char envbuf[envbytes, 2048],
+                               in uint8 flags,
+                               out errval err);
+
+    rpc spawn_proc_mgmt_domain_with_caps(in cap domain_cap,
+                                         in String path[2048],
+                                         in char argvbuf[argvbytes, 2048],
+                                         in char envbuf[envbytes, 2048],
+                                         in cap inheritcn_cap,
+                                         in cap argcn_cap,
+                                         in uint8 flags,
+                                         out errval err);
+
+    rpc span(in cap domain_cap, in cap vroot, in cap dispframe, out errval err);
+
     rpc use_local_memserv();
+    rpc kill(in domainid domain_id, out errval err);
+
+    /*
+     * XXX: domain_id shouldn't be here. Instead, spawnd should figure
+     * out from the binding what domain it is sending the request.
+     */
+    rpc exit(in domainid domain_id, in uint8 exitcode);
+
+    rpc wait(in domainid domain_id, in bool nohang, out uint8 exitcode, out errval err);
+
+    // XXX: Should be domainid instead of uint8, but it's not yet supported
+    rpc get_domainlist(out uint8 domains[len, 2048]);
+
+    rpc status(in domainid domain_id, out ps_entry ps_entry, out char argv[len, 2048],
+              out errval err);
+
+    // Capability debugging
+    rpc dump_capabilities(in domainid domain_id, out errval err);
 };