+ int vc_ctx_migrate(xid_t xid, uint_least64_t flags);
+
+ /** \brief Statistics about a context */
+ struct vc_ctx_stat {
+ uint_least32_t usecnt; ///< number of uses
+ uint_least32_t tasks; ///< number of tasks
+ };
+
+ /** \brief Get some statistics about a context.
+ * \ingroup syscalls
+ *
+ * \param xid The context to get stats about
+ * \param stat Where to store the result
+ *
+ * \returns 0 on success, -1 on errors. */
+ int vc_ctx_stat(xid_t xid, struct vc_ctx_stat /*@out@*/ *stat) VC_ATTR_NONNULL((2));
+
+ /** \brief Contains further statistics about a context. */
+ struct vc_virt_stat {
+ uint_least64_t offset;
+ uint_least64_t uptime;
+ uint_least32_t nr_threads;
+ uint_least32_t nr_running;
+ uint_least32_t nr_uninterruptible;
+ uint_least32_t nr_onhold;
+ uint_least32_t nr_forks;
+ uint_least32_t load[3];
+ };
+
+ /** \brief Get more statistics about a context.
+ * \ingroup syscalls
+ *
+ * \param xid The context to get stats about
+ * \param stat Where to store the result
+ *
+ * \returns 0 on success, -1 on errors. */
+ int vc_virt_stat(xid_t xid, struct vc_virt_stat /*@out@*/ *stat) VC_ATTR_NONNULL((2));
+
+ /** \brief Sends a signal to a context/pid
+ * \ingroup syscalls
+ *
+ * Special values for \a pid are:
+ * - -1 which means every process in ctx except the init-process
+ * - 0 which means every process in ctx inclusive the init-process */
+ int vc_ctx_kill(xid_t ctx, pid_t pid, int sig);
+
+ int vc_get_cflags(xid_t xid, struct vc_ctx_flags /*@out@*/ *) VC_ATTR_NONNULL((2));
+ int vc_set_cflags(xid_t xid, struct vc_ctx_flags /*@in@*/ const *) VC_ATTR_NONNULL((2));
+
+ /** \brief Capabilities of process-contexts */
+ struct vc_ctx_caps {
+ /** \brief Mask of set common system capabilities */
+ uint_least64_t bcaps;
+ /** \brief Mask of set and unset common system capabilities when used by
+ * set operations, or the modifiable capabilities when used by
+ * get operations */
+ uint_least64_t bmask;
+ /** \brief Mask of set process context capabilities */
+ uint_least64_t ccaps;
+ /** \brief Mask of set and unset process context capabilities when used
+ * by set operations, or the modifiable capabilities when used
+ * by get operations */
+ uint_least64_t cmask;
+ };
+
+ int vc_get_ccaps(xid_t xid, struct vc_ctx_caps *);
+ int vc_set_ccaps(xid_t xid, struct vc_ctx_caps const *);
+
+ struct vc_vx_info {
+ xid_t xid;
+ pid_t initpid;
+ };
+
+ int vc_get_vx_info(xid_t xid, struct vc_vx_info *info) VC_ATTR_NONNULL((2));
+
+ /** \brief Returns the context of the given process.
+ * \ingroup syscalls
+ *
+ * \param pid the process-id whose xid shall be determined;
+ * pid==0 means the current process.
+ * \returns the xid of process \c pid or -1 on errors
+ */
+ xid_t vc_get_task_xid(pid_t pid);
+
+ /** \brief Waits for the end of a context
+ * \ingroup syscalls
+ */
+ int vc_wait_exit(xid_t xid);