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

Unified Diff: newlib/libc/include/spawn.h

Issue 650343002: Split posix_spawn.c into 3 different files (Closed) Base URL: http://git.chromium.org/native_client/nacl-newlib.git@master
Patch Set: Created 6 years, 2 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 | newlib/libc/posix/Makefile.am » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: newlib/libc/include/spawn.h
diff --git a/newlib/libc/include/spawn.h b/newlib/libc/include/spawn.h
index 5a6692f11558de5c7785fb1a7b47985e8e718ebd..3d3067d914bbd22387fc746451f93c56d40e7217 100644
--- a/newlib/libc/include/spawn.h
+++ b/newlib/libc/include/spawn.h
@@ -28,16 +28,49 @@
#define _SPAWN_H_
#include <_ansi.h>
+#include <sched.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/_types.h>
+#include <sys/queue.h>
#define __need_sigset_t
#include <signal.h>
struct sched_param;
-typedef struct __posix_spawnattr *posix_spawnattr_t;
-typedef struct __posix_spawn_file_actions *posix_spawn_file_actions_t;
+typedef struct {
+ short sa_flags;
+ pid_t sa_pgroup;
+ struct sched_param sa_schedparam;
+ int sa_schedpolicy;
+ sigset_t sa_sigdefault;
+ sigset_t sa_sigmask;
+} posix_spawnattr_t;
+
+typedef struct __posix_spawn_file_actions_entry {
+ STAILQ_ENTRY(__posix_spawn_file_actions_entry) fae_list;
+ enum { FAE_OPEN, FAE_DUP2, FAE_CLOSE } fae_action;
+
+ int fae_fildes;
+ union {
+ struct {
+ char *path;
+#define fae_path fae_data.open.path
+ int oflag;
+#define fae_oflag fae_data.open.oflag
+ mode_t mode;
+#define fae_mode fae_data.open.mode
+ } open;
+ struct {
+ int newfildes;
+#define fae_newfildes fae_data.dup2.newfildes
+ } dup2;
+ } fae_data;
+} posix_spawn_file_actions_entry_t;
+
+typedef struct {
+ STAILQ_HEAD(, __posix_spawn_file_actions_entry) fa_list;
+} posix_spawn_file_actions_t;
#define POSIX_SPAWN_RESETIDS 0x01
#define POSIX_SPAWN_SETPGROUP 0x02
« no previous file with comments | « no previous file | newlib/libc/posix/Makefile.am » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698