Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: src/untrusted/irt/irt_dev.h

Issue 24908002: Provide IRT process interface Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/untrusted/irt/irt_interfaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/irt/irt_dev.h
diff --git a/src/untrusted/irt/irt_dev.h b/src/untrusted/irt/irt_dev.h
index 22ec0e1e16f288ff941fd1de3f3ea5e8f5750ce6..055bf265ca65d6d432b150f7927d88521602f184 100644
--- a/src/untrusted/irt/irt_dev.h
+++ b/src/untrusted/irt/irt_dev.h
@@ -16,11 +16,30 @@ struct timeval;
struct NaClMemMappingInfo;
+#include <spawn.h>
+
#if defined(__cplusplus)
extern "C" {
#endif
#define NACL_IRT_DEV_FDIO_v0_2 "nacl-irt-dev-fdio-0.2"
+struct nacl_irt_dev_fdio_v0_2 {
+ int (*close)(int fd);
+ int (*dup)(int fd, int *newfd);
+ int (*dup2)(int fd, int newfd);
+ int (*read)(int fd, void *buf, size_t count, size_t *nread);
+ int (*write)(int fd, const void *buf, size_t count, size_t *nwrote);
+ int (*seek)(int fd, off_t offset, int whence, off_t *new_offset);
+ int (*fstat)(int fd, struct stat *);
+ int (*getdents)(int fd, struct dirent *, size_t count, size_t *nread);
+ int (*fchdir)(int fd);
+ int (*fchmod)(int fd, mode_t mode);
+ int (*fsync)(int fd);
+ int (*fdatasync)(int fd);
+ int (*ftruncate)(int fd, off_t length);
+};
+
+#define NACL_IRT_DEV_FDIO_v0_3 "nacl-irt-dev-fdio-0.3"
struct nacl_irt_dev_fdio {
int (*close)(int fd);
int (*dup)(int fd, int *newfd);
@@ -35,6 +54,7 @@ struct nacl_irt_dev_fdio {
int (*fsync)(int fd);
int (*fdatasync)(int fd);
int (*ftruncate)(int fd, off_t length);
+ int (*pipe)(int pipefd[2]);
};
/*
@@ -81,6 +101,25 @@ struct nacl_irt_dev_list_mappings {
size_t count, size_t *result_count);
};
+#define NACL_IRT_DEV_PROCESS_v0_1 "nacl-irt-dev-process-0.1"
+struct nacl_irt_dev_process {
+ int (*getpid)(pid_t *pid);
+ int (*getppid)(pid_t *ppid);
+ int (*setpgid)(pid_t pid, pid_t pgid);
+ int (*getpgid)(pid_t pid, pid_t *pgid);
+ int (*setsid)(pid_t *sid);
+ int (*getsid)(pid_t pid, pid_t *sid);
+ int (*kill)(pid_t pid, int sig);
+ int (*posix_spawn)(pid_t *pid, const char *path,
+ const posix_spawn_file_actions_t *file_actions,
+ const posix_spawnattr_t *attrp,
+ char *const argv[], char *const envp[]);
+ int (*signal)(int sig, sighandler_t handler, sighandler_t *oldhandler);
+ int (*sigprocmask)(int how, const sigset_t *set, sigset_t *oldset);
+ int (*wait)(int *pid, int *status);
+ int (*waitpid)(int *pid, int *status, int options);
+};
+
#if defined(__cplusplus)
}
#endif
« no previous file with comments | « no previous file | src/untrusted/irt/irt_interfaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698