View | Details | Raw Unified | Return to bug 216033 | Differences between
and this patch

Collapse All | Expand All

(-)include/err.h (-1 / +4 lines)
Lines 43-48 Link Here
43
#include <sys/cdefs.h>
43
#include <sys/cdefs.h>
44
#include <sys/_types.h>
44
#include <sys/_types.h>
45
45
46
__NULLABILITY_PRAGMA_PUSH
47
46
__BEGIN_DECLS
48
__BEGIN_DECLS
47
void	err(int, const char *, ...) __dead2 __printf0like(2, 3);
49
void	err(int, const char *, ...) __dead2 __printf0like(2, 3);
48
void	verr(int, const char *, __va_list) __dead2 __printf0like(2, 0);
50
void	verr(int, const char *, __va_list) __dead2 __printf0like(2, 0);
Lines 58-64 Link Here
58
void	warnx(const char *, ...) __printflike(1, 2);
60
void	warnx(const char *, ...) __printflike(1, 2);
59
void	vwarnx(const char *, __va_list) __printflike(1, 0);
61
void	vwarnx(const char *, __va_list) __printflike(1, 0);
60
void	err_set_file(void *);
62
void	err_set_file(void *);
61
void	err_set_exit(void (*)(int));
63
void	err_set_exit(void (* _Nullable)(int));
62
__END_DECLS
64
__END_DECLS
65
__NULLABILITY_PRAGMA_POP
63
66
64
#endif /* !_ERR_H_ */
67
#endif /* !_ERR_H_ */
(-)include/pthread.h (-113 / +133 lines)
Lines 46-51 Link Here
46
#include <sched.h>
46
#include <sched.h>
47
#include <time.h>
47
#include <time.h>
48
48
49
__NULLABILITY_PRAGMA_PUSH
50
49
/*
51
/*
50
 * Run-time invariant values:
52
 * Run-time invariant values:
51
 */
53
 */
Lines 147-174 Link Here
147
 */
149
 */
148
__BEGIN_DECLS
150
__BEGIN_DECLS
149
int		pthread_atfork(void (*)(void), void (*)(void), void (*)(void));
151
int		pthread_atfork(void (*)(void), void (*)(void), void (*)(void));
150
int		pthread_attr_destroy(pthread_attr_t *);
152
int		pthread_attr_destroy(pthread_attr_t * _Nonnull);
151
int		pthread_attr_getstack(const pthread_attr_t * __restrict, 
153
int		pthread_attr_getstack(
152
			void ** __restrict, size_t * __restrict);
154
		    const pthread_attr_t * _Nonnull __restrict, 
153
int		pthread_attr_getstacksize(const pthread_attr_t *, size_t *);
155
		    void ** _Nonnull __restrict,
154
int		pthread_attr_getguardsize(const pthread_attr_t *, size_t *);
156
		    size_t * _Nonnull __restrict);
157
int		pthread_attr_getstacksize(const pthread_attr_t * _Nonnull,
158
		    size_t * _Nonnull);
159
int		pthread_attr_getguardsize(const pthread_attr_t * _Nonnull,
160
		    size_t * _Nonnull);
155
int		pthread_attr_getstackaddr(const pthread_attr_t *, void **);
161
int		pthread_attr_getstackaddr(const pthread_attr_t *, void **);
156
int		pthread_attr_getdetachstate(const pthread_attr_t *, int *);
162
int		pthread_attr_getdetachstate(const pthread_attr_t * _Nonnull,
157
int		pthread_attr_init(pthread_attr_t *);
163
		    int * _Nonnull);
158
int		pthread_attr_setstacksize(pthread_attr_t *, size_t);
164
int		pthread_attr_init(pthread_attr_t * _Nonnull);
159
int		pthread_attr_setguardsize(pthread_attr_t *, size_t);
165
int		pthread_attr_setstacksize(pthread_attr_t * _Nonnull, size_t);
160
int		pthread_attr_setstack(pthread_attr_t *, void *, size_t);
166
int		pthread_attr_setguardsize(pthread_attr_t * _Nonnull, size_t);
167
int		pthread_attr_setstack(pthread_attr_t * _Nonnull, void *,
168
		    size_t);
161
int		pthread_attr_setstackaddr(pthread_attr_t *, void *);
169
int		pthread_attr_setstackaddr(pthread_attr_t *, void *);
162
int		pthread_attr_setdetachstate(pthread_attr_t *, int);
170
int		pthread_attr_setdetachstate(pthread_attr_t * _Nonnull, int);
163
int		pthread_barrier_destroy(pthread_barrier_t *);
171
int		pthread_barrier_destroy(pthread_barrier_t * _Nonnull);
164
int		pthread_barrier_init(pthread_barrier_t *,
172
int		pthread_barrier_init(pthread_barrier_t * _Nonnull,
165
			const pthread_barrierattr_t *, unsigned);
173
			const pthread_barrierattr_t *, unsigned);
166
int		pthread_barrier_wait(pthread_barrier_t *);
174
int		pthread_barrier_wait(pthread_barrier_t * _Nonnull);
167
int		pthread_barrierattr_destroy(pthread_barrierattr_t *);
175
int		pthread_barrierattr_destroy(pthread_barrierattr_t * _Nonnull);
168
int		pthread_barrierattr_getpshared(const pthread_barrierattr_t *,
176
int		pthread_barrierattr_getpshared(
169
			int *);
177
		    const pthread_barrierattr_t * _Nonnull, int * _Nonnull);
170
int		pthread_barrierattr_init(pthread_barrierattr_t *);
178
int		pthread_barrierattr_init(pthread_barrierattr_t * _Nonnull);
171
int		pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
179
int		pthread_barrierattr_setpshared(pthread_barrierattr_t * _Nonnull,
180
		    int);
172
181
173
#define		pthread_cleanup_push(cleanup_routine, cleanup_arg)		\
182
#define		pthread_cleanup_push(cleanup_routine, cleanup_arg)		\
174
		{								\
183
		{								\
Lines 183-282 Link Here
183
			__pthread_cleanup_pop_imp(execute);			\
192
			__pthread_cleanup_pop_imp(execute);			\
184
		}
193
		}
185
194
186
int		pthread_condattr_destroy(pthread_condattr_t *);
195
int		pthread_condattr_destroy(pthread_condattr_t * _Nonnull);
187
int		pthread_condattr_getclock(const pthread_condattr_t *,
196
int		pthread_condattr_getclock(const pthread_condattr_t * _Nonnull,
188
			clockid_t *);
197
		    clockid_t * _Nonnull);
189
int		pthread_condattr_getpshared(const pthread_condattr_t *, int *);
198
int		pthread_condattr_getpshared(const pthread_condattr_t * _Nonnull,
190
int		pthread_condattr_init(pthread_condattr_t *);
199
		    int * _Nonnull);
191
int		pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
200
int		pthread_condattr_init(pthread_condattr_t * _Nonnull);
192
int		pthread_condattr_setpshared(pthread_condattr_t *, int);
201
int		pthread_condattr_setclock(pthread_condattr_t * _Nonnull,
193
int		pthread_cond_broadcast(pthread_cond_t *);
202
		    clockid_t);
194
int		pthread_cond_destroy(pthread_cond_t *);
203
int		pthread_condattr_setpshared(pthread_condattr_t * _Nonnull, int);
195
int		pthread_cond_init(pthread_cond_t *,
204
int		pthread_cond_broadcast(pthread_cond_t * _Nonnull);
205
int		pthread_cond_destroy(pthread_cond_t * _Nonnull);
206
int		pthread_cond_init(pthread_cond_t * _Nonnull,
196
			const pthread_condattr_t *);
207
			const pthread_condattr_t *);
197
int		pthread_cond_signal(pthread_cond_t *);
208
int		pthread_cond_signal(pthread_cond_t * _Nonnull);
198
int		pthread_cond_timedwait(pthread_cond_t *,
209
int		pthread_cond_timedwait(pthread_cond_t * _Nonnull,
199
			pthread_mutex_t *__mutex, const struct timespec *)
210
		    pthread_mutex_t * _Nonnull __mutex,
211
		    const struct timespec * _Nonnull)
200
		    __requires_exclusive(*__mutex);
212
		    __requires_exclusive(*__mutex);
201
int		pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex)
213
int		pthread_cond_wait(pthread_cond_t * _Nonnull,
214
		    pthread_mutex_t * _Nonnull __mutex)
202
		    __requires_exclusive(*__mutex);
215
		    __requires_exclusive(*__mutex);
203
int		pthread_create(pthread_t *, const pthread_attr_t *,
216
int		pthread_create(pthread_t * _Nonnull, const pthread_attr_t *,
204
			void *(*) (void *), void *);
217
		    void *(* _Nonnull) (void *), void *);
205
int		pthread_detach(pthread_t);
218
int		pthread_detach(pthread_t);
206
int		pthread_equal(pthread_t, pthread_t);
219
int		pthread_equal(pthread_t, pthread_t);
207
void		pthread_exit(void *) __dead2;
220
void		pthread_exit(void *) __dead2;
208
void		*pthread_getspecific(pthread_key_t);
221
void		*pthread_getspecific(pthread_key_t);
209
int		pthread_getcpuclockid(pthread_t, clockid_t *);
222
int		pthread_getcpuclockid(pthread_t, clockid_t * _Nonnull);
210
int		pthread_join(pthread_t, void **);
223
int		pthread_join(pthread_t, void **);
211
int		pthread_key_create(pthread_key_t *,
224
int		pthread_key_create(pthread_key_t * _Nonnull,
212
			void (*) (void *));
225
		    void (*) (void *));
213
int		pthread_key_delete(pthread_key_t);
226
int		pthread_key_delete(pthread_key_t);
214
int		pthread_mutexattr_init(pthread_mutexattr_t *);
227
int		pthread_mutexattr_init(pthread_mutexattr_t * _Nonnull);
215
int		pthread_mutexattr_destroy(pthread_mutexattr_t *);
228
int		pthread_mutexattr_destroy(pthread_mutexattr_t * _Nonnull);
216
int		pthread_mutexattr_getpshared(const pthread_mutexattr_t *,
229
int		pthread_mutexattr_getpshared(
217
			int *);
230
		    const pthread_mutexattr_t * _Nonnull, int * _Nonnull);
218
int		pthread_mutexattr_gettype(pthread_mutexattr_t *, int *);
231
int		pthread_mutexattr_gettype(pthread_mutexattr_t * _Nonnull,
219
int		pthread_mutexattr_settype(pthread_mutexattr_t *, int);
232
		    int * _Nonnull);
220
int		pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
233
int		pthread_mutexattr_settype(pthread_mutexattr_t * _Nonnull, int);
221
int		pthread_mutex_consistent(pthread_mutex_t *__mutex)
234
int		pthread_mutexattr_setpshared(pthread_mutexattr_t * _Nonnull,
222
			__nonnull(1) __requires_exclusive(*__mutex);
235
		    int);
223
int		pthread_mutex_destroy(pthread_mutex_t *__mutex)
236
int		pthread_mutex_consistent(pthread_mutex_t * _Nonnull __mutex)
237
		    __requires_exclusive(*__mutex);
238
int		pthread_mutex_destroy(pthread_mutex_t * _Nonnull __mutex)
224
		    __requires_unlocked(*__mutex);
239
		    __requires_unlocked(*__mutex);
225
int		pthread_mutex_init(pthread_mutex_t *__mutex,
240
int		pthread_mutex_init(pthread_mutex_t * _Nonnull __mutex,
226
			const pthread_mutexattr_t *)
241
		    const pthread_mutexattr_t *)
227
		    __requires_unlocked(*__mutex);
242
		    __requires_unlocked(*__mutex);
228
int		pthread_mutex_lock(pthread_mutex_t *__mutex)
243
int		pthread_mutex_lock(pthread_mutex_t * _Nonnull __mutex)
229
                    __locks_exclusive(*__mutex);
244
		    __locks_exclusive(*__mutex);
230
int		pthread_mutex_trylock(pthread_mutex_t *__mutex)
245
int		pthread_mutex_trylock(pthread_mutex_t * _Nonnull __mutex)
231
                    __trylocks_exclusive(0, *__mutex);
246
		    __trylocks_exclusive(0, *__mutex);
232
int		pthread_mutex_timedlock(pthread_mutex_t *__mutex,
247
int		pthread_mutex_timedlock(pthread_mutex_t * _Nonnull __mutex,
233
			const struct timespec *)
248
		    const struct timespec * _Nonnull)
234
                    __trylocks_exclusive(0, *__mutex);
249
		    __trylocks_exclusive(0, *__mutex);
235
int		pthread_mutex_unlock(pthread_mutex_t *__mutex)
250
int		pthread_mutex_unlock(pthread_mutex_t * _Nonnull __mutex)
236
		    __unlocks(*__mutex);
251
		    __unlocks(*__mutex);
237
int		pthread_once(pthread_once_t *, void (*) (void));
252
int		pthread_once(pthread_once_t * _Nonnull,
238
int		pthread_rwlock_destroy(pthread_rwlock_t *__rwlock)
253
		    void (* _Nonnull) (void));
254
int		pthread_rwlock_destroy(pthread_rwlock_t * _Nonnull __rwlock)
239
		    __requires_unlocked(*__rwlock);
255
		    __requires_unlocked(*__rwlock);
240
int		pthread_rwlock_init(pthread_rwlock_t *__rwlock,
256
int		pthread_rwlock_init(pthread_rwlock_t * _Nonnull __rwlock,
241
			const pthread_rwlockattr_t *)
257
		    const pthread_rwlockattr_t *)
242
		    __requires_unlocked(*__rwlock);
258
		    __requires_unlocked(*__rwlock);
243
int		pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock)
259
int		pthread_rwlock_rdlock(pthread_rwlock_t * _Nonnull __rwlock)
244
                    __locks_shared(*__rwlock);
260
		    __locks_shared(*__rwlock);
245
int		pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock,
261
int		pthread_rwlock_timedrdlock(pthread_rwlock_t * _Nonnull __rwlock,
246
			const struct timespec *)
262
		    const struct timespec * _Nonnull)
247
                    __trylocks_shared(0, *__rwlock);
263
		    __trylocks_shared(0, *__rwlock);
248
int		pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock,
264
int		pthread_rwlock_timedwrlock(pthread_rwlock_t * _Nonnull __rwlock,
249
			const struct timespec *)
265
		    const struct timespec * _Nonnull)
250
                    __trylocks_exclusive(0, *__rwlock);
266
		    __trylocks_exclusive(0, *__rwlock);
251
int		pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock)
267
int		pthread_rwlock_tryrdlock(pthread_rwlock_t * _Nonnull __rwlock)
252
                    __trylocks_shared(0, *__rwlock);
268
		    __trylocks_shared(0, *__rwlock);
253
int		pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock)
269
int		pthread_rwlock_trywrlock(pthread_rwlock_t * _Nonnull __rwlock)
254
                    __trylocks_exclusive(0, *__rwlock);
270
		    __trylocks_exclusive(0, *__rwlock);
255
int		pthread_rwlock_unlock(pthread_rwlock_t *__rwlock)
271
int		pthread_rwlock_unlock(pthread_rwlock_t * _Nonnull __rwlock)
256
		    __unlocks(*__rwlock);
272
		    __unlocks(*__rwlock);
257
int		pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock)
273
int		pthread_rwlock_wrlock(pthread_rwlock_t * _Nonnull __rwlock)
258
                    __locks_exclusive(*__rwlock);
274
		    __locks_exclusive(*__rwlock);
259
int		pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
275
int		pthread_rwlockattr_destroy(pthread_rwlockattr_t * _Nonnull);
260
int		pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *,
276
int		pthread_rwlockattr_getkind_np(
261
			int *);
277
		    const pthread_rwlockattr_t * _Nonnull, int *);
262
int		pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *,
278
int		pthread_rwlockattr_getpshared(
263
			int *);
279
		    const pthread_rwlockattr_t * _Nonnull, int * _Nonnull);
264
int		pthread_rwlockattr_init(pthread_rwlockattr_t *);
280
int		pthread_rwlockattr_init(pthread_rwlockattr_t * _Nonnull);
265
int		pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, int);
281
int		pthread_rwlockattr_setkind_np(pthread_rwlockattr_t * _Nonnull,
266
int		pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
282
		    int);
283
int		pthread_rwlockattr_setpshared(pthread_rwlockattr_t * _Nonnull,
284
		    int);
267
pthread_t	pthread_self(void);
285
pthread_t	pthread_self(void);
268
int		pthread_setspecific(pthread_key_t, const void *);
286
int		pthread_setspecific(pthread_key_t, const void *);
269
287
270
int		pthread_spin_init(pthread_spinlock_t *__spin, int)
288
int		pthread_spin_init(pthread_spinlock_t * _Nonnull __spin, int)
271
		    __requires_unlocked(*__spin);
289
		    __requires_unlocked(*__spin);
272
int		pthread_spin_destroy(pthread_spinlock_t *__spin)
290
int		pthread_spin_destroy(pthread_spinlock_t * _Nonnull __spin)
273
		    __requires_unlocked(*__spin);
291
		    __requires_unlocked(*__spin);
274
int		pthread_spin_lock(pthread_spinlock_t *__spin)
292
int		pthread_spin_lock(pthread_spinlock_t * _Nonnull __spin)
275
                    __locks_exclusive(*__spin);
293
			__locks_exclusive(*__spin);
276
int		pthread_spin_trylock(pthread_spinlock_t *__spin)
294
int		pthread_spin_trylock(pthread_spinlock_t * _Nonnull __spin)
277
                    __trylocks_exclusive(0, *__spin);
295
			__trylocks_exclusive(0, *__spin);
278
int		pthread_spin_unlock(pthread_spinlock_t *__spin)
296
int		pthread_spin_unlock(pthread_spinlock_t * _Nonnull __spin)
279
		    __unlocks(*__spin);
297
			__unlocks(*__spin);
280
int		pthread_cancel(pthread_t);
298
int		pthread_cancel(pthread_t);
281
int		pthread_setcancelstate(int, int *);
299
int		pthread_setcancelstate(int, int *);
282
int		pthread_setcanceltype(int, int *);
300
int		pthread_setcanceltype(int, int *);
Lines 288-297 Link Here
288
void		pthread_yield(void);
306
void		pthread_yield(void);
289
#endif
307
#endif
290
308
291
int		pthread_mutexattr_getprioceiling(pthread_mutexattr_t *,
309
int		pthread_mutexattr_getprioceiling(pthread_mutexattr_t *, int *);
292
			int *);
310
int		pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
293
int		pthread_mutexattr_setprioceiling(pthread_mutexattr_t *,
294
			int);
295
int		pthread_mutex_getprioceiling(pthread_mutex_t *, int *);
311
int		pthread_mutex_getprioceiling(pthread_mutex_t *, int *);
296
int		pthread_mutex_setprioceiling(pthread_mutex_t *, int, int *);
312
int		pthread_mutex_setprioceiling(pthread_mutex_t *, int, int *);
297
313
Lines 298-322 Link Here
298
int		pthread_mutexattr_getprotocol(pthread_mutexattr_t *, int *);
314
int		pthread_mutexattr_getprotocol(pthread_mutexattr_t *, int *);
299
int		pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
315
int		pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
300
316
301
int		pthread_mutexattr_getrobust(pthread_mutexattr_t *__restrict,
317
int		pthread_mutexattr_getrobust(
302
			int *__restrict) __nonnull_all;
318
		    pthread_mutexattr_t * _Nonnull __restrict,
303
int		pthread_mutexattr_setrobust(pthread_mutexattr_t *, int)
319
		    int * _Nonnull __restrict);
304
			__nonnull(1);
320
int		pthread_mutexattr_setrobust(pthread_mutexattr_t * _Nonnull,
321
		    int);
305
322
306
int		pthread_attr_getinheritsched(const pthread_attr_t *, int *);
323
int		pthread_attr_getinheritsched(const pthread_attr_t *, int *);
307
int		pthread_attr_getschedparam(const pthread_attr_t *,
324
int		pthread_attr_getschedparam(const pthread_attr_t * _Nonnull,
308
			struct sched_param *);
325
		    struct sched_param * _Nonnull);
309
int		pthread_attr_getschedpolicy(const pthread_attr_t *, int *);
326
int		pthread_attr_getschedpolicy(const pthread_attr_t * _Nonnull,
310
int		pthread_attr_getscope(const pthread_attr_t *, int *);
327
		    int * _Nonnull);
328
int		pthread_attr_getscope(const pthread_attr_t * _Nonnull,
329
		    int * _Nonnull);
311
int		pthread_attr_setinheritsched(pthread_attr_t *, int);
330
int		pthread_attr_setinheritsched(pthread_attr_t *, int);
312
int		pthread_attr_setschedparam(pthread_attr_t *,
331
int		pthread_attr_setschedparam(pthread_attr_t * _Nonnull,
313
			const struct sched_param *);
332
		    const struct sched_param * _Nonnull);
314
int		pthread_attr_setschedpolicy(pthread_attr_t *, int);
333
int		pthread_attr_setschedpolicy(pthread_attr_t * _Nonnull, int);
315
int		pthread_attr_setscope(pthread_attr_t *, int);
334
int		pthread_attr_setscope(pthread_attr_t * _Nonnull, int);
316
int		pthread_getschedparam(pthread_t pthread, int *,
335
int		pthread_getschedparam(pthread_t pthread, int * _Nonnull,
317
			struct sched_param *);
336
		    struct sched_param * _Nonnull);
318
int		pthread_setschedparam(pthread_t, int,
337
int		pthread_setschedparam(pthread_t, int,
319
			const struct sched_param *);
338
		    const struct sched_param * _Nonnull);
320
#if __XSI_VISIBLE
339
#if __XSI_VISIBLE
321
int		pthread_getconcurrency(void);
340
int		pthread_getconcurrency(void);
322
int		pthread_setconcurrency(int);
341
int		pthread_setconcurrency(int);
Lines 326-330 Link Here
326
			struct _pthread_cleanup_info *);
345
			struct _pthread_cleanup_info *);
327
void		__pthread_cleanup_pop_imp(int);
346
void		__pthread_cleanup_pop_imp(int);
328
__END_DECLS
347
__END_DECLS
348
__NULLABILITY_PRAGMA_POP
329
349
330
#endif
350
#endif	/* _PTHREAD_H_ */
(-)include/signal.h (-4 / +8 lines)
Lines 41-46 Link Here
41
#include <sys/_ucontext.h>
41
#include <sys/_ucontext.h>
42
#endif
42
#endif
43
43
44
__NULLABILITY_PRAGMA_PUSH
45
44
#if __BSD_VISIBLE
46
#if __BSD_VISIBLE
45
/*
47
/*
46
 * XXX should enlarge these, if only to give empty names instead of bounds
48
 * XXX should enlarge these, if only to give empty names instead of bounds
Lines 82-91 Link Here
82
int	sigemptyset(sigset_t *);
84
int	sigemptyset(sigset_t *);
83
int	sigfillset(sigset_t *);
85
int	sigfillset(sigset_t *);
84
int	sigismember(const sigset_t *, int);
86
int	sigismember(const sigset_t *, int);
85
int	sigpending(sigset_t *);
87
int	sigpending(sigset_t * _Nonnull);
86
int	sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
88
int	sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
87
int	sigsuspend(const sigset_t *);
89
int	sigsuspend(const sigset_t * _Nonnull);
88
int	sigwait(const sigset_t * __restrict, int * __restrict);
90
int	sigwait(const sigset_t * _Nonnull __restrict,
91
	    int * _Nonnull __restrict);
89
#endif
92
#endif
90
93
91
#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600
94
#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600
Lines 104-110 Link Here
104
int	sigignore(int);
107
int	sigignore(int);
105
int	sigpause(int);
108
int	sigpause(int);
106
int	sigrelse(int);
109
int	sigrelse(int);
107
void	(*sigset(int, void (*)(int)))(int);
110
void	(* _Nullable sigset(int, void (* _Nullable)(int)))(int);
108
int	xsi_sigpause(int);
111
int	xsi_sigpause(int);
109
#endif
112
#endif
110
113
Lines 124-128 Link Here
124
int	sigvec(int, struct sigvec *, struct sigvec *);
127
int	sigvec(int, struct sigvec *, struct sigvec *);
125
#endif
128
#endif
126
__END_DECLS
129
__END_DECLS
130
__NULLABILITY_PRAGMA_POP
127
131
128
#endif /* !_SIGNAL_H_ */
132
#endif /* !_SIGNAL_H_ */
(-)include/stdio.h (-8 / +12 lines)
Lines 40-45 Link Here
40
#include <sys/_null.h>
40
#include <sys/_null.h>
41
#include <sys/_types.h>
41
#include <sys/_types.h>
42
42
43
__NULLABILITY_PRAGMA_PUSH
44
43
typedef	__off_t		fpos_t;
45
typedef	__off_t		fpos_t;
44
46
45
#ifndef _SIZE_T_DECLARED
47
#ifndef _SIZE_T_DECLARED
Lines 123-132 Link Here
123
125
124
	/* operations */
126
	/* operations */
125
	void	*_cookie;	/* (*) cookie passed to io functions */
127
	void	*_cookie;	/* (*) cookie passed to io functions */
126
	int	(*_close)(void *);
128
	int	(* _Nullable _close)(void *);
127
	int	(*_read)(void *, char *, int);
129
	int	(* _Nullable _read)(void *, char *, int);
128
	fpos_t	(*_seek)(void *, fpos_t, int);
130
	fpos_t	(* _Nullable _seek)(void *, fpos_t, int);
129
	int	(*_write)(void *, const char *, int);
131
	int	(* _Nullable _write)(void *, const char *, int);
130
132
131
	/* separate buffer for long sequences of ungetc() */
133
	/* separate buffer for long sequences of ungetc() */
132
	struct	__sbuf _ub;	/* ungetc buffer */
134
	struct	__sbuf _ub;	/* ungetc buffer */
Lines 390-399 Link Here
390
 * Stdio function-access interface.
392
 * Stdio function-access interface.
391
 */
393
 */
392
FILE	*funopen(const void *,
394
FILE	*funopen(const void *,
393
	    int (*)(void *, char *, int),
395
	    int (* _Nullable)(void *, char *, int),
394
	    int (*)(void *, const char *, int),
396
	    int (* _Nullable)(void *, const char *, int),
395
	    fpos_t (*)(void *, fpos_t, int),
397
	    fpos_t (* _Nullable)(void *, fpos_t, int),
396
	    int (*)(void *));
398
	    int (* _Nullable)(void *));
397
#define	fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
399
#define	fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
398
#define	fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
400
#define	fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
399
401
Lines 506-509 Link Here
506
#endif /* __cplusplus */
508
#endif /* __cplusplus */
507
509
508
__END_DECLS
510
__END_DECLS
511
__NULLABILITY_PRAGMA_POP
512
509
#endif /* !_STDIO_H_ */
513
#endif /* !_STDIO_H_ */
(-)include/stdlib.h (-8 / +13 lines)
Lines 37-42 Link Here
37
#include <sys/_null.h>
37
#include <sys/_null.h>
38
#include <sys/_types.h>
38
#include <sys/_types.h>
39
39
40
__NULLABILITY_PRAGMA_PUSH
41
40
#if __BSD_VISIBLE
42
#if __BSD_VISIBLE
41
#ifndef _RUNE_T_DECLARED
43
#ifndef _RUNE_T_DECLARED
42
typedef	__rune_t	rune_t;
44
typedef	__rune_t	rune_t;
Lines 81-92 Link Here
81
83
82
_Noreturn void	 abort(void);
84
_Noreturn void	 abort(void);
83
int	 abs(int) __pure2;
85
int	 abs(int) __pure2;
84
int	 atexit(void (*)(void));
86
int	 atexit(void (* _Nonnull)(void));
85
double	 atof(const char *);
87
double	 atof(const char *);
86
int	 atoi(const char *);
88
int	 atoi(const char *);
87
long	 atol(const char *);
89
long	 atol(const char *);
88
void	*bsearch(const void *, const void *, size_t,
90
void	*bsearch(const void *, const void *, size_t,
89
	    size_t, int (*)(const void *, const void *));
91
	    size_t, int (*)(const void * _Nonnull, const void *));
90
void	*calloc(size_t, size_t) __malloc_like __result_use_check
92
void	*calloc(size_t, size_t) __malloc_like __result_use_check
91
	     __alloc_size(1) __alloc_size(2);
93
	     __alloc_size(1) __alloc_size(2);
92
div_t	 div(int, int) __pure2;
94
div_t	 div(int, int) __pure2;
Lines 100-106 Link Here
100
size_t	 mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
102
size_t	 mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
101
int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
103
int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
102
void	 qsort(void *, size_t, size_t,
104
void	 qsort(void *, size_t, size_t,
103
	    int (*)(const void *, const void *));
105
	    int (* _Nonnull)(const void *, const void *));
104
int	 rand(void);
106
int	 rand(void);
105
void	*realloc(void *, size_t) __result_use_check __alloc_size(2);
107
void	*realloc(void *, size_t) __result_use_check __alloc_size(2);
106
void	 srand(unsigned);
108
void	 srand(unsigned);
Lines 256-264 Link Here
256
__uint32_t 
258
__uint32_t 
257
	 arc4random_uniform(__uint32_t);
259
	 arc4random_uniform(__uint32_t);
258
#ifdef __BLOCKS__
260
#ifdef __BLOCKS__
259
int	 atexit_b(void (^)(void));
261
int	 atexit_b(void (^ _Nonnull)(void));
260
void	*bsearch_b(const void *, const void *, size_t,
262
void	*bsearch_b(const void *, const void *, size_t,
261
	    size_t, int (^)(const void *, const void *));
263
	    size_t, int (^ _Nonnull)(const void *, const void *));
262
#endif
264
#endif
263
char	*getbsize(int *, long *);
265
char	*getbsize(int *, long *);
264
					/* getcap(3) functions */
266
					/* getcap(3) functions */
Lines 282-292 Link Here
282
const char *
284
const char *
283
	 getprogname(void);
285
	 getprogname(void);
284
286
285
int	 heapsort(void *, size_t, size_t, int (*)(const void *, const void *));
287
int	 heapsort(void *, size_t, size_t,
288
	    int (* _Nonnull)(const void *, const void *));
286
#ifdef __BLOCKS__
289
#ifdef __BLOCKS__
287
int	 heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *));
290
int	 heapsort_b(void *, size_t, size_t,
291
	    int (^ _Nonnull)(const void *, const void *));
288
void	 qsort_b(void *, size_t, size_t,
292
void	 qsort_b(void *, size_t, size_t,
289
	    int (^)(const void *, const void *));
293
	    int (^ _Nonnull)(const void *, const void *));
290
#endif
294
#endif
291
int	 l64a_r(long, char *, int);
295
int	 l64a_r(long, char *, int);
292
int	 mergesort(void *, size_t, size_t, int (*)(const void *, const void *));
296
int	 mergesort(void *, size_t, size_t, int (*)(const void *, const void *));
Lines 320-324 Link Here
320
extern char *suboptarg;			/* getsubopt(3) external variable */
324
extern char *suboptarg;			/* getsubopt(3) external variable */
321
#endif /* __BSD_VISIBLE */
325
#endif /* __BSD_VISIBLE */
322
__END_DECLS
326
__END_DECLS
327
__NULLABILITY_PRAGMA_POP
323
328
324
#endif /* !_STDLIB_H_ */
329
#endif /* !_STDLIB_H_ */
(-)sys/sys/cdefs.h (-8 lines)
Lines 375-388 Link Here
375
#define	__noinline
375
#define	__noinline
376
#endif
376
#endif
377
377
378
#if __GNUC_PREREQ__(3, 3)
379
#define	__nonnull(x)	__attribute__((__nonnull__(x)))
380
#define	__nonnull_all	__attribute__((__nonnull__))
381
#else
382
#define	__nonnull(x)
383
#define	__nonnull_all
384
#endif
385
386
#if __GNUC_PREREQ__(3, 4)
378
#if __GNUC_PREREQ__(3, 4)
387
#define	__fastcall	__attribute__((__fastcall__))
379
#define	__fastcall	__attribute__((__fastcall__))
388
#define	__result_use_check	__attribute__((__warn_unused_result__))
380
#define	__result_use_check	__attribute__((__warn_unused_result__))
(-)sys/sys/systm.h (-31 / +35 lines)
Lines 45-50 Link Here
45
#include <sys/queue.h>
45
#include <sys/queue.h>
46
#include <sys/stdint.h>		/* for people using printf mainly */
46
#include <sys/stdint.h>		/* for people using printf mainly */
47
47
48
__NULLABILITY_PRAGMA_PUSH
49
48
extern int cold;		/* nonzero if we are doing a cold boot */
50
extern int cold;		/* nonzero if we are doing a cold boot */
49
extern int suspend_blocked;	/* block suspend due to pending shutdown */
51
extern int suspend_blocked;	/* block suspend due to pending shutdown */
50
extern int rebooting;		/* kern_reboot() has been called. */
52
extern int rebooting;		/* kern_reboot() has been called. */
Lines 227-238 Link Here
227
int	vsnrprintf(char *, size_t, int, const char *, __va_list) __printflike(4, 0);
229
int	vsnrprintf(char *, size_t, int, const char *, __va_list) __printflike(4, 0);
228
int	vsprintf(char *buf, const char *, __va_list) __printflike(2, 0);
230
int	vsprintf(char *buf, const char *, __va_list) __printflike(2, 0);
229
int	ttyprintf(struct tty *, const char *, ...) __printflike(2, 3);
231
int	ttyprintf(struct tty *, const char *, ...) __printflike(2, 3);
230
int	sscanf(const char *, char const *, ...) __nonnull(1) __nonnull(2) __scanflike(2, 3);
232
int	sscanf(const char *, char const * _Nonnull, ...) __scanflike(2, 3);
231
int	vsscanf(const char *, char const *, __va_list) __nonnull(1) __nonnull(2) __scanflike(2, 0);
233
int	vsscanf(const char * _Nonnull, char const * _Nonnull, __va_list)  __scanflike(2, 0);
232
long	strtol(const char *, char **, int) __nonnull(1);
234
long	strtol(const char *, char **, int);
233
u_long	strtoul(const char *, char **, int) __nonnull(1);
235
u_long	strtoul(const char *, char **, int);
234
quad_t	strtoq(const char *, char **, int) __nonnull(1);
236
quad_t	strtoq(const char *, char **, int);
235
u_quad_t strtouq(const char *, char **, int) __nonnull(1);
237
u_quad_t strtouq(const char *, char **, int);
236
void	tprintf(struct proc *p, int pri, const char *, ...) __printflike(3, 4);
238
void	tprintf(struct proc *p, int pri, const char *, ...) __printflike(3, 4);
237
void	vtprintf(struct proc *, int, const char *, __va_list) __printflike(3, 0);
239
void	vtprintf(struct proc *, int, const char *, __va_list) __printflike(3, 0);
238
void	hexdump(const void *ptr, int length, const char *hdr, int flags);
240
void	hexdump(const void *ptr, int length, const char *hdr, int flags);
Lines 243-269 Link Here
243
#define	HD_OMIT_CHARS	(1 << 18)
245
#define	HD_OMIT_CHARS	(1 << 18)
244
246
245
#define ovbcopy(f, t, l) bcopy((f), (t), (l))
247
#define ovbcopy(f, t, l) bcopy((f), (t), (l))
246
void	bcopy(const void *from, void *to, size_t len) __nonnull(1) __nonnull(2);
248
void	bcopy(const void * _Nonnull from, void * _Nonnull to, size_t len);
247
void	bzero(void *buf, size_t len) __nonnull(1);
249
void	bzero(void * _Nonnull buf, size_t len);
248
void	explicit_bzero(void *, size_t) __nonnull(1);
250
void	explicit_bzero(void * _Nonnull, size_t);
249
251
250
void	*memcpy(void *to, const void *from, size_t len) __nonnull(1) __nonnull(2);
252
void	*memcpy(void * _Nonnull to, const void * _Nonnull from, size_t len);
251
void	*memmove(void *dest, const void *src, size_t n) __nonnull(1) __nonnull(2);
253
void	*memmove(void * _Nonnull dest, const void * _Nonnull src, size_t n);
252
254
253
int	copystr(const void * __restrict kfaddr, void * __restrict kdaddr,
255
int	copystr(const void * _Nonnull __restrict kfaddr,
254
	    size_t len, size_t * __restrict lencopied)
256
	    void * _Nonnull __restrict kdaddr, size_t len,
255
	    __nonnull(1) __nonnull(2);
257
	    size_t * __restrict lencopied);
256
int	copyinstr(const void * __restrict udaddr, void * __restrict kaddr,
258
int	copyinstr(const void * __restrict udaddr,
257
	    size_t len, size_t * __restrict lencopied)
259
	    void * _Nonnull __restrict kaddr, size_t len,
258
	    __nonnull(1) __nonnull(2);
260
	    size_t * __restrict lencopied);
259
int	copyin(const void * __restrict udaddr, void * __restrict kaddr,
261
int	copyin(const void * _Nonnull __restrict udaddr,
260
	    size_t len) __nonnull(1) __nonnull(2);
262
	    void * _Nonnull __restrict kaddr, size_t len);
261
int	copyin_nofault(const void * __restrict udaddr, void * __restrict kaddr,
263
int	copyin_nofault(const void * _Nonnull __restrict udaddr,
262
	    size_t len) __nonnull(1) __nonnull(2);
264
	    void * _Nonnull __restrict kaddr, size_t len);
263
int	copyout(const void * __restrict kaddr, void * __restrict udaddr,
265
int	copyout(const void * _Nonnull __restrict kaddr,
264
	    size_t len) __nonnull(1) __nonnull(2);
266
	    void * _Nonnull __restrict udaddr, size_t len);
265
int	copyout_nofault(const void * __restrict kaddr, void * __restrict udaddr,
267
int	copyout_nofault(const void * _Nonnull __restrict kaddr,
266
	    size_t len) __nonnull(1) __nonnull(2);
268
	    void * _Nonnull __restrict udaddr, size_t len);
267
269
268
int	fubyte(volatile const void *base);
270
int	fubyte(volatile const void *base);
269
long	fuword(volatile const void *base);
271
long	fuword(volatile const void *base);
Lines 374-381 Link Here
374
 * Common `proc' functions are declared here so that proc.h can be included
376
 * Common `proc' functions are declared here so that proc.h can be included
375
 * less often.
377
 * less often.
376
 */
378
 */
377
int	_sleep(void *chan, struct lock_object *lock, int pri, const char *wmesg,
379
int	_sleep(void * _Nonnull chan, struct lock_object *lock, int pri,
378
	   sbintime_t sbt, sbintime_t pr, int flags) __nonnull(1);
380
	   const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags);
379
#define	msleep(chan, mtx, pri, wmesg, timo)				\
381
#define	msleep(chan, mtx, pri, wmesg, timo)				\
380
	_sleep((chan), &(mtx)->lock_object, (pri), (wmesg),		\
382
	_sleep((chan), &(mtx)->lock_object, (pri), (wmesg),		\
381
	    tick_sbt * (timo), 0, C_HARDCLOCK)
383
	    tick_sbt * (timo), 0, C_HARDCLOCK)
Lines 382-389 Link Here
382
#define	msleep_sbt(chan, mtx, pri, wmesg, bt, pr, flags)		\
384
#define	msleep_sbt(chan, mtx, pri, wmesg, bt, pr, flags)		\
383
	_sleep((chan), &(mtx)->lock_object, (pri), (wmesg), (bt), (pr),	\
385
	_sleep((chan), &(mtx)->lock_object, (pri), (wmesg), (bt), (pr),	\
384
	    (flags))
386
	    (flags))
385
int	msleep_spin_sbt(void *chan, struct mtx *mtx, const char *wmesg,
387
int	msleep_spin_sbt(void * _Nonnull chan, struct mtx *mtx,
386
	    sbintime_t sbt, sbintime_t pr, int flags) __nonnull(1);
388
	    const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags);
387
#define	msleep_spin(chan, mtx, wmesg, timo)				\
389
#define	msleep_spin(chan, mtx, wmesg, timo)				\
388
	msleep_spin_sbt((chan), (mtx), (wmesg), tick_sbt * (timo),	\
390
	msleep_spin_sbt((chan), (mtx), (wmesg), tick_sbt * (timo),	\
389
	    0, C_HARDCLOCK)
391
	    0, C_HARDCLOCK)
Lines 396-403 Link Here
396
	    0, C_HARDCLOCK)
398
	    0, C_HARDCLOCK)
397
#define	tsleep_sbt(chan, pri, wmesg, bt, pr, flags)			\
399
#define	tsleep_sbt(chan, pri, wmesg, bt, pr, flags)			\
398
	_sleep((chan), NULL, (pri), (wmesg), (bt), (pr), (flags))
400
	_sleep((chan), NULL, (pri), (wmesg), (bt), (pr), (flags))
399
void	wakeup(void *chan) __nonnull(1);
401
void	wakeup(void * chan);
400
void	wakeup_one(void *chan) __nonnull(1);
402
void	wakeup_one(void * chan);
401
403
402
/*
404
/*
403
 * Common `struct cdev *' stuff are declared here to avoid #include poisoning
405
 * Common `struct cdev *' stuff are declared here to avoid #include poisoning
Lines 445-448 Link Here
445
447
446
void counted_warning(unsigned *counter, const char *msg);
448
void counted_warning(unsigned *counter, const char *msg);
447
449
450
__NULLABILITY_PRAGMA_POP
451
448
#endif /* !_SYS_SYSTM_H_ */
452
#endif /* !_SYS_SYSTM_H_ */
(-)lib/libthr/thread/thr_private.h (-5 / +7 lines)
Lines 53-58 Link Here
53
#include <sys/thr.h>
53
#include <sys/thr.h>
54
#include <pthread.h>
54
#include <pthread.h>
55
55
56
__NULLABILITY_PRAGMA_PUSH
57
56
#define	SYM_FB10(sym)			__CONCAT(sym, _fb10)
58
#define	SYM_FB10(sym)			__CONCAT(sym, _fb10)
57
#define	SYM_FBP10(sym)			__CONCAT(sym, _fbp10)
59
#define	SYM_FBP10(sym)			__CONCAT(sym, _fbp10)
58
#define	WEAK_REF(sym, alias)		__weak_reference(sym, alias)
60
#define	WEAK_REF(sym, alias)		__weak_reference(sym, alias)
Lines 835-845 Link Here
835
void	_pthread_exit_mask(void *status, sigset_t *mask) __dead2 __hidden;
837
void	_pthread_exit_mask(void *status, sigset_t *mask) __dead2 __hidden;
836
void	_pthread_cancel_enter(int maycancel);
838
void	_pthread_cancel_enter(int maycancel);
837
void 	_pthread_cancel_leave(int maycancel);
839
void 	_pthread_cancel_leave(int maycancel);
838
int	_pthread_mutex_consistent(pthread_mutex_t *) __nonnull(1);
840
int	_pthread_mutex_consistent(pthread_mutex_t * _Nonnull);
839
int	_pthread_mutexattr_getrobust(pthread_mutexattr_t *__restrict,
841
int	_pthread_mutexattr_getrobust(pthread_mutexattr_t * _Nonnull __restrict,
840
	    int *__restrict) __nonnull_all;
842
	    int * _Nonnull __restrict);
841
int	_pthread_mutexattr_setrobust(pthread_mutexattr_t *, int)
843
int	_pthread_mutexattr_setrobust(pthread_mutexattr_t * _Nonnull, int);
842
	    __nonnull(1);
843
844
844
/* #include <fcntl.h> */
845
/* #include <fcntl.h> */
845
#ifdef  _SYS_FCNTL_H_
846
#ifdef  _SYS_FCNTL_H_
Lines 984-988 Link Here
984
void __thr_pshared_atfork_post(void) __hidden;
985
void __thr_pshared_atfork_post(void) __hidden;
985
986
986
__END_DECLS
987
__END_DECLS
988
__NULLABILITY_PRAGMA_POP
987
989
988
#endif  /* !_THR_PRIVATE_H */
990
#endif  /* !_THR_PRIVATE_H */

Return to bug 216033