-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstuff.h
172 lines (172 loc) · 2.88 KB
/
stuff.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
* Many-to-one preemptive userspace threads.
*
* BUGS
*
* The use of SIGALRM and ITIMER_REAL is reserved by the
* implementation.
*
* There's still a bunch of thread local state that is improperly
* global which breaks things.
*
* - thread local variables (the .tdata section should be swapped in
* and out depending on the thread.)
*
* - the thread-specific data area
* - pending signals
* - the sigaltstack
* - the TID
*
* Strictly speaking, the only functions callable without locking are
* asynch-signal safe ones but most thread safe functions should be
* callable (although that depends on the implementation).
*
* Also, nonblocking direct system calls such as mmap should probably
* be async-signal-safe but they are aren't guaranteed to be. Blocking
* direct system calls are less likely to be async-signal-safe because
* weird stuff for interruptibility is done by the implementation.
*
* Below is a list of functions that are probably safe to call.
*
* If POSIX.1-2004 is supported (2004 guarantees a few extras but they
* were removed in 2008 so they probably shouldn't be trusted):
*
* _Exit()
* _exit()
* abort()
* accept()
* access()
* aio_error()
* aio_return()
* aio_suspend()
* alarm()
* bind()
* cfgetispeed()
* cfgetospeed()
* cfsetispeed()
* cfsetospeed()
* chdir()
* chmod()
* chown()
* clock_gettime()
* close()
* connect()
* creat()
* dup()
* dup2()
* execle()
* execve()
* fchmod()
* fchown()
* fcntl()
* fdatasync()
* fork()
* fstat()
* fsync()
* ftruncate()
* getegid()
* geteuid()
* getgid()
* getgroups()
* getpeername()
* getpgrp()
* getpid()
* getppid()
* getsockname()
* getsockopt()
* getuid()
* kill()
* link()
* listen()
* lseek()
* lstat()
* mkdir()
* mkfifo()
* open()
* pause()
* pipe()
* poll()
* posix_trace_event()
* pselect()
* raise()
* read()
* readlink()
* recv()
* recvfrom()
* recvmsg()
* rename()
* rmdir()
* select()
* sem_post()
* send()
* sendmsg()
* sendto()
* setgid()
* setpgid()
* setsid()
* setsockopt()
* setuid()
* shutdown()
* sigaction()
* sigaddset()
* sigdelset()
* sigemptyset()
* sigfillset()
* sigismember()
* signal()
* sigpause()
* sigpending()
* sigprocmask()
* sigqueue()
* sigset()
* sigsuspend()
* sleep()
* sockatmark()
* socket()
* socketpair()
* stat()
* symlink()
* tcdrain()
* tcflow()
* tcflush()
* tcgetattr()
* tcgetpgrp()
* tcsendbreak()
* tcsetattr()
* tcsetpgrp()
* time()
* timer_getoverrun()
* timer_gettime()
* timer_settime()
* times()
* umask()
* uname()
* unlink()
* utime()
* wait()
* waitpid()
* write()
*
* If POSIX.1-2008 is supported:
*
* execl()
* execv()
* faccessat()
* fchmodat()
* fchownat()
* fexecve()
* fstatat()
* futimens()
* linkat()
* mkdirat()
* mkfifoat()
* mknod()
* mknodat()
* openat()
* readlinkat()
* renameat()
* symlinkat()
* unlinkat()
* utimensat()
* utimes()
*/