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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | newlib/libc/posix/Makefile.am » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /*- 1 /*-
2 * Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org> 2 * Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 10 matching lines...) Expand all
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE. 24 * SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef _SPAWN_H_ 27 #ifndef _SPAWN_H_
28 #define _SPAWN_H_ 28 #define _SPAWN_H_
29 29
30 #include <_ansi.h> 30 #include <_ansi.h>
31 #include <sched.h>
31 #include <sys/cdefs.h> 32 #include <sys/cdefs.h>
32 #include <sys/types.h> 33 #include <sys/types.h>
33 #include <sys/_types.h> 34 #include <sys/_types.h>
35 #include <sys/queue.h>
34 #define __need_sigset_t 36 #define __need_sigset_t
35 #include <signal.h> 37 #include <signal.h>
36 38
37 struct sched_param; 39 struct sched_param;
38 40
39 typedef struct __posix_spawnattr» » *posix_spawnattr_t; 41 typedef struct {
40 typedef struct __posix_spawn_file_actions» *posix_spawn_file_actions_t; 42 » short» » » sa_flags;
43 » pid_t» » » sa_pgroup;
44 » struct sched_param» sa_schedparam;
45 » int» » » sa_schedpolicy;
46 » sigset_t» » sa_sigdefault;
47 » sigset_t» » sa_sigmask;
48 } posix_spawnattr_t;
49
50 typedef struct __posix_spawn_file_actions_entry {
51 » STAILQ_ENTRY(__posix_spawn_file_actions_entry) fae_list;
52 » enum { FAE_OPEN, FAE_DUP2, FAE_CLOSE } fae_action;
53
54 » int fae_fildes;
55 » union {
56 » » struct {
57 » » » char *path;
58 #define fae_path» fae_data.open.path
59 » » » int oflag;
60 #define fae_oflag» fae_data.open.oflag
61 » » » mode_t mode;
62 #define fae_mode» fae_data.open.mode
63 » » } open;
64 » » struct {
65 » » » int newfildes;
66 #define fae_newfildes» fae_data.dup2.newfildes
67 » » } dup2;
68 » } fae_data;
69 } posix_spawn_file_actions_entry_t;
70
71 typedef struct {
72 » STAILQ_HEAD(, __posix_spawn_file_actions_entry) fa_list;
73 } posix_spawn_file_actions_t;
41 74
42 #define POSIX_SPAWN_RESETIDS 0x01 75 #define POSIX_SPAWN_RESETIDS 0x01
43 #define POSIX_SPAWN_SETPGROUP 0x02 76 #define POSIX_SPAWN_SETPGROUP 0x02
44 #define POSIX_SPAWN_SETSCHEDPARAM 0x04 77 #define POSIX_SPAWN_SETSCHEDPARAM 0x04
45 #define POSIX_SPAWN_SETSCHEDULER 0x08 78 #define POSIX_SPAWN_SETSCHEDULER 0x08
46 #define POSIX_SPAWN_SETSIGDEF 0x10 79 #define POSIX_SPAWN_SETSIGDEF 0x10
47 #define POSIX_SPAWN_SETSIGMASK 0x20 80 #define POSIX_SPAWN_SETSIGMASK 0x20
48 81
49 _BEGIN_STD_C 82 _BEGIN_STD_C
50 /* 83 /*
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 int _EXFUN(posix_spawnattr_setschedpolicy, (posix_spawnattr_t *, int)); 143 int _EXFUN(posix_spawnattr_setschedpolicy, (posix_spawnattr_t *, int));
111 int _EXFUN(posix_spawnattr_setsigdefault, 144 int _EXFUN(posix_spawnattr_setsigdefault,
112 (posix_spawnattr_t * __restrict, const sigset_t * __restrict) 145 (posix_spawnattr_t * __restrict, const sigset_t * __restrict)
113 ); 146 );
114 int _EXFUN(posix_spawnattr_setsigmask, 147 int _EXFUN(posix_spawnattr_setsigmask,
115 (posix_spawnattr_t * __restrict, const sigset_t * __restrict) 148 (posix_spawnattr_t * __restrict, const sigset_t * __restrict)
116 ); 149 );
117 _END_STD_C 150 _END_STD_C
118 151
119 #endif /* !_SPAWN_H_ */ 152 #endif /* !_SPAWN_H_ */
OLDNEW
« 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