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

Side by Side Diff: fusl/include/spawn.h

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 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
OLDNEW
1 #ifndef _SPAWN_H 1 #ifndef _SPAWN_H
2 #define _SPAWN_H 2 #define _SPAWN_H
3 3
4 #ifdef __cplusplus 4 #ifdef __cplusplus
5 extern "C" { 5 extern "C" {
6 #endif 6 #endif
7 7
8 #include <features.h> 8 #include <features.h>
9 9
10 #define __NEED_mode_t 10 #define __NEED_mode_t
11 #define __NEED_pid_t 11 #define __NEED_pid_t
12 #define __NEED_sigset_t 12 #define __NEED_sigset_t
13 13
14 #include <bits/alltypes.h> 14 #include <bits/alltypes.h>
15 15
16 struct sched_param; 16 struct sched_param;
17 17
18 #define POSIX_SPAWN_RESETIDS 1 18 #define POSIX_SPAWN_RESETIDS 1
19 #define POSIX_SPAWN_SETPGROUP 2 19 #define POSIX_SPAWN_SETPGROUP 2
20 #define POSIX_SPAWN_SETSIGDEF 4 20 #define POSIX_SPAWN_SETSIGDEF 4
21 #define POSIX_SPAWN_SETSIGMASK 8 21 #define POSIX_SPAWN_SETSIGMASK 8
22 #define POSIX_SPAWN_SETSCHEDPARAM 16 22 #define POSIX_SPAWN_SETSCHEDPARAM 16
23 #define POSIX_SPAWN_SETSCHEDULER 32 23 #define POSIX_SPAWN_SETSCHEDULER 32
24 24
25 typedef struct { 25 typedef struct {
26 » int __flags; 26 int __flags;
27 » pid_t __pgrp; 27 pid_t __pgrp;
28 » sigset_t __def, __mask; 28 sigset_t __def, __mask;
29 » int __prio, __pol, __pad[16]; 29 int __prio, __pol, __pad[16];
30 } posix_spawnattr_t; 30 } posix_spawnattr_t;
31 31
32 typedef struct { 32 typedef struct {
33 » int __pad0[2]; 33 int __pad0[2];
34 » void *__actions; 34 void* __actions;
35 » int __pad[16]; 35 int __pad[16];
36 } posix_spawn_file_actions_t; 36 } posix_spawn_file_actions_t;
37 37
38 int posix_spawn(pid_t *__restrict, const char *__restrict, const posix_spawn_fil e_actions_t *, 38 int posix_spawn(pid_t* __restrict,
39 » const posix_spawnattr_t *__restrict, char *const *__restrict, char *cons t *__restrict); 39 const char* __restrict,
40 int posix_spawnp(pid_t *__restrict, const char *__restrict, const posix_spawn_fi le_actions_t *, 40 const posix_spawn_file_actions_t*,
41 » const posix_spawnattr_t *__restrict, char *const *__restrict, char *cons t *__restrict); 41 const posix_spawnattr_t* __restrict,
42 char* const* __restrict,
43 char* const* __restrict);
44 int posix_spawnp(pid_t* __restrict,
45 const char* __restrict,
46 const posix_spawn_file_actions_t*,
47 const posix_spawnattr_t* __restrict,
48 char* const* __restrict,
49 char* const* __restrict);
42 50
43 int posix_spawnattr_init(posix_spawnattr_t *); 51 int posix_spawnattr_init(posix_spawnattr_t*);
44 int posix_spawnattr_destroy(posix_spawnattr_t *); 52 int posix_spawnattr_destroy(posix_spawnattr_t*);
45 53
46 int posix_spawnattr_setflags(posix_spawnattr_t *, short); 54 int posix_spawnattr_setflags(posix_spawnattr_t*, short);
47 int posix_spawnattr_getflags(const posix_spawnattr_t *__restrict, short *__restr ict); 55 int posix_spawnattr_getflags(const posix_spawnattr_t* __restrict,
56 short* __restrict);
48 57
49 int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t); 58 int posix_spawnattr_setpgroup(posix_spawnattr_t*, pid_t);
50 int posix_spawnattr_getpgroup(const posix_spawnattr_t *__restrict, pid_t *__rest rict); 59 int posix_spawnattr_getpgroup(const posix_spawnattr_t* __restrict,
60 pid_t* __restrict);
51 61
52 int posix_spawnattr_setsigmask(posix_spawnattr_t *__restrict, const sigset_t *__ restrict); 62 int posix_spawnattr_setsigmask(posix_spawnattr_t* __restrict,
53 int posix_spawnattr_getsigmask(const posix_spawnattr_t *__restrict, sigset_t *__ restrict); 63 const sigset_t* __restrict);
64 int posix_spawnattr_getsigmask(const posix_spawnattr_t* __restrict,
65 sigset_t* __restrict);
54 66
55 int posix_spawnattr_setsigdefault(posix_spawnattr_t *__restrict, const sigset_t *__restrict); 67 int posix_spawnattr_setsigdefault(posix_spawnattr_t* __restrict,
56 int posix_spawnattr_getsigdefault(const posix_spawnattr_t *__restrict, sigset_t *__restrict); 68 const sigset_t* __restrict);
69 int posix_spawnattr_getsigdefault(const posix_spawnattr_t* __restrict,
70 sigset_t* __restrict);
57 71
58 int posix_spawnattr_setschedparam(posix_spawnattr_t *__restrict, const struct sc hed_param *__restrict); 72 int posix_spawnattr_setschedparam(posix_spawnattr_t* __restrict,
59 int posix_spawnattr_getschedparam(const posix_spawnattr_t *__restrict, struct sc hed_param *__restrict); 73 const struct sched_param* __restrict);
60 int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int); 74 int posix_spawnattr_getschedparam(const posix_spawnattr_t* __restrict,
61 int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *__restrict, int *__r estrict); 75 struct sched_param* __restrict);
76 int posix_spawnattr_setschedpolicy(posix_spawnattr_t*, int);
77 int posix_spawnattr_getschedpolicy(const posix_spawnattr_t* __restrict,
78 int* __restrict);
62 79
63 int posix_spawn_file_actions_init(posix_spawn_file_actions_t *); 80 int posix_spawn_file_actions_init(posix_spawn_file_actions_t*);
64 int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *); 81 int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t*);
65 82
66 int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *__restrict, int , const char *__restrict, int, mode_t); 83 int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t* __restrict,
67 int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int); 84 int,
68 int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int); 85 const char* __restrict,
86 int,
87 mode_t);
88 int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t*, int);
89 int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t*, int, int);
69 90
70 #ifdef __cplusplus 91 #ifdef __cplusplus
71 } 92 }
72 #endif 93 #endif
73 94
74 #endif 95 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698