source: CIVL/examples/pthread/svcomp/singleton_false-unreach-call.i@ bb03188

main test-branch
Last change on this file since bb03188 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 52.2 KB
Line 
1extern void __VERIFIER_error() __attribute__ ((__noreturn__));
2
3typedef long unsigned int size_t;
4typedef int wchar_t;
5
6union wait
7 {
8 int w_status;
9 struct
10 {
11 unsigned int __w_termsig:7;
12 unsigned int __w_coredump:1;
13 unsigned int __w_retcode:8;
14 unsigned int:16;
15 } __wait_terminated;
16 struct
17 {
18 unsigned int __w_stopval:8;
19 unsigned int __w_stopsig:8;
20 unsigned int:16;
21 } __wait_stopped;
22 };
23typedef union
24 {
25 union wait *__uptr;
26 int *__iptr;
27 } __WAIT_STATUS __attribute__ ((__transparent_union__));
28
29typedef struct
30 {
31 int quot;
32 int rem;
33 } div_t;
34typedef struct
35 {
36 long int quot;
37 long int rem;
38 } ldiv_t;
39
40
41__extension__ typedef struct
42 {
43 long long int quot;
44 long long int rem;
45 } lldiv_t;
46
47extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) ;
48
49extern double atof (__const char *__nptr)
50 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
51extern int atoi (__const char *__nptr)
52 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
53extern long int atol (__const char *__nptr)
54 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
55
56
57__extension__ extern long long int atoll (__const char *__nptr)
58 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
59
60
61extern double strtod (__const char *__restrict __nptr,
62 char **__restrict __endptr)
63 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
64
65
66extern float strtof (__const char *__restrict __nptr,
67 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
68extern long double strtold (__const char *__restrict __nptr,
69 char **__restrict __endptr)
70 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
71
72
73extern long int strtol (__const char *__restrict __nptr,
74 char **__restrict __endptr, int __base)
75 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
76extern unsigned long int strtoul (__const char *__restrict __nptr,
77 char **__restrict __endptr, int __base)
78 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
79
80__extension__
81extern long long int strtoq (__const char *__restrict __nptr,
82 char **__restrict __endptr, int __base)
83 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
84__extension__
85extern unsigned long long int strtouq (__const char *__restrict __nptr,
86 char **__restrict __endptr, int __base)
87 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
88
89__extension__
90extern long long int strtoll (__const char *__restrict __nptr,
91 char **__restrict __endptr, int __base)
92 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
93__extension__
94extern unsigned long long int strtoull (__const char *__restrict __nptr,
95 char **__restrict __endptr, int __base)
96 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
97
98extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) ;
99extern long int a64l (__const char *__s)
100 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
101
102typedef unsigned char __u_char;
103typedef unsigned short int __u_short;
104typedef unsigned int __u_int;
105typedef unsigned long int __u_long;
106typedef signed char __int8_t;
107typedef unsigned char __uint8_t;
108typedef signed short int __int16_t;
109typedef unsigned short int __uint16_t;
110typedef signed int __int32_t;
111typedef unsigned int __uint32_t;
112typedef signed long int __int64_t;
113typedef unsigned long int __uint64_t;
114typedef long int __quad_t;
115typedef unsigned long int __u_quad_t;
116typedef unsigned long int __dev_t;
117typedef unsigned int __uid_t;
118typedef unsigned int __gid_t;
119typedef unsigned long int __ino_t;
120typedef unsigned long int __ino64_t;
121typedef unsigned int __mode_t;
122typedef unsigned long int __nlink_t;
123typedef long int __off_t;
124typedef long int __off64_t;
125typedef int __pid_t;
126typedef struct { int __val[2]; } __fsid_t;
127typedef long int __clock_t;
128typedef unsigned long int __rlim_t;
129typedef unsigned long int __rlim64_t;
130typedef unsigned int __id_t;
131typedef long int __time_t;
132typedef unsigned int __useconds_t;
133typedef long int __suseconds_t;
134typedef int __daddr_t;
135typedef long int __swblk_t;
136typedef int __key_t;
137typedef int __clockid_t;
138typedef void * __timer_t;
139typedef long int __blksize_t;
140typedef long int __blkcnt_t;
141typedef long int __blkcnt64_t;
142typedef unsigned long int __fsblkcnt_t;
143typedef unsigned long int __fsblkcnt64_t;
144typedef unsigned long int __fsfilcnt_t;
145typedef unsigned long int __fsfilcnt64_t;
146typedef long int __ssize_t;
147typedef __off64_t __loff_t;
148typedef __quad_t *__qaddr_t;
149typedef char *__caddr_t;
150typedef long int __intptr_t;
151typedef unsigned int __socklen_t;
152typedef __u_char u_char;
153typedef __u_short u_short;
154typedef __u_int u_int;
155typedef __u_long u_long;
156typedef __quad_t quad_t;
157typedef __u_quad_t u_quad_t;
158typedef __fsid_t fsid_t;
159typedef __loff_t loff_t;
160typedef __ino_t ino_t;
161typedef __dev_t dev_t;
162typedef __gid_t gid_t;
163typedef __mode_t mode_t;
164typedef __nlink_t nlink_t;
165typedef __uid_t uid_t;
166typedef __off_t off_t;
167typedef __pid_t pid_t;
168typedef __id_t id_t;
169typedef __ssize_t ssize_t;
170typedef __daddr_t daddr_t;
171typedef __caddr_t caddr_t;
172typedef __key_t key_t;
173
174typedef __clock_t clock_t;
175
176
177
178typedef __time_t time_t;
179
180
181typedef __clockid_t clockid_t;
182typedef __timer_t timer_t;
183typedef unsigned long int ulong;
184typedef unsigned short int ushort;
185typedef unsigned int uint;
186typedef int int8_t __attribute__ ((__mode__ (__QI__)));
187typedef int int16_t __attribute__ ((__mode__ (__HI__)));
188typedef int int32_t __attribute__ ((__mode__ (__SI__)));
189typedef int int64_t __attribute__ ((__mode__ (__DI__)));
190typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
191typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
192typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
193typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
194typedef int register_t __attribute__ ((__mode__ (__word__)));
195typedef int __sig_atomic_t;
196typedef struct
197 {
198 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
199 } __sigset_t;
200typedef __sigset_t sigset_t;
201struct timespec
202 {
203 __time_t tv_sec;
204 long int tv_nsec;
205 };
206struct timeval
207 {
208 __time_t tv_sec;
209 __suseconds_t tv_usec;
210 };
211typedef __suseconds_t suseconds_t;
212typedef long int __fd_mask;
213typedef struct
214 {
215 __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
216 } fd_set;
217typedef __fd_mask fd_mask;
218
219extern int select (int __nfds, fd_set *__restrict __readfds,
220 fd_set *__restrict __writefds,
221 fd_set *__restrict __exceptfds,
222 struct timeval *__restrict __timeout);
223extern int pselect (int __nfds, fd_set *__restrict __readfds,
224 fd_set *__restrict __writefds,
225 fd_set *__restrict __exceptfds,
226 const struct timespec *__restrict __timeout,
227 const __sigset_t *__restrict __sigmask);
228
229
230__extension__
231extern unsigned int gnu_dev_major (unsigned long long int __dev)
232 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
233__extension__
234extern unsigned int gnu_dev_minor (unsigned long long int __dev)
235 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
236__extension__
237extern unsigned long long int gnu_dev_makedev (unsigned int __major,
238 unsigned int __minor)
239 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
240
241typedef __blksize_t blksize_t;
242typedef __blkcnt_t blkcnt_t;
243typedef __fsblkcnt_t fsblkcnt_t;
244
245
246typedef __fsfilcnt_t fsfilcnt_t;
247typedef unsigned long int pthread_t;
248typedef union
249{
250 char __size[56];
251 long int __align;
252} pthread_attr_t;
253typedef struct __pthread_internal_list
254{
255 struct __pthread_internal_list *__prev;
256 struct __pthread_internal_list *__next;
257} __pthread_list_t;
258typedef union
259{
260 struct __pthread_mutex_s
261 {
262 int __lock;
263 unsigned int __count;
264 int __owner;
265 unsigned int __nusers;
266 int __kind;
267 int __spins;
268 __pthread_list_t __list;
269 } __data;
270 char __size[40];
271 long int __align;
272} pthread_mutex_t;
273typedef union
274{
275 char __size[4];
276 int __align;
277} pthread_mutexattr_t;
278typedef union
279{
280 struct
281 {
282 int __lock;
283 unsigned int __futex;
284 __extension__ unsigned long long int __total_seq;
285 __extension__ unsigned long long int __wakeup_seq;
286 __extension__ unsigned long long int __woken_seq;
287 void *__mutex;
288 unsigned int __nwaiters;
289 unsigned int __broadcast_seq;
290 } __data;
291 char __size[48];
292 __extension__ long long int __align;
293} pthread_cond_t;
294typedef union
295{
296 char __size[4];
297 int __align;
298} pthread_condattr_t;
299typedef unsigned int pthread_key_t;
300typedef int pthread_once_t;
301typedef union
302{
303 struct
304 {
305 int __lock;
306 unsigned int __nr_readers;
307 unsigned int __readers_wakeup;
308 unsigned int __writer_wakeup;
309 unsigned int __nr_readers_queued;
310 unsigned int __nr_writers_queued;
311 int __writer;
312 int __shared;
313 unsigned long int __pad1;
314 unsigned long int __pad2;
315 unsigned int __flags;
316 } __data;
317 char __size[56];
318 long int __align;
319} pthread_rwlock_t;
320typedef union
321{
322 char __size[8];
323 long int __align;
324} pthread_rwlockattr_t;
325typedef volatile int pthread_spinlock_t;
326typedef union
327{
328 char __size[32];
329 long int __align;
330} pthread_barrier_t;
331typedef union
332{
333 char __size[4];
334 int __align;
335} pthread_barrierattr_t;
336
337extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
338extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
339extern char *initstate (unsigned int __seed, char *__statebuf,
340 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
341
342
343extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
344
345
346
347
348
349
350
351struct random_data
352 {
353 int32_t *fptr;
354 int32_t *rptr;
355 int32_t *state;
356 int rand_type;
357 int rand_deg;
358 int rand_sep;
359 int32_t *end_ptr;
360 };
361
362extern int random_r (struct random_data *__restrict __buf,
363 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
364
365extern int srandom_r (unsigned int __seed, struct random_data *__buf)
366 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
367
368extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
369 size_t __statelen,
370 struct random_data *__restrict __buf)
371 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
372
373extern int setstate_r (char *__restrict __statebuf,
374 struct random_data *__restrict __buf)
375 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
376
377
378
379
380
381
382extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
383
384extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
385
386
387
388
389extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
390
391
392
393
394
395
396
397extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
398extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
399
400
401extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
402extern long int nrand48 (unsigned short int __xsubi[3])
403 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
404
405
406extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
407extern long int jrand48 (unsigned short int __xsubi[3])
408 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
409
410
411extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
412extern unsigned short int *seed48 (unsigned short int __seed16v[3])
413 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
414extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
415
416
417
418
419
420struct drand48_data
421 {
422 unsigned short int __x[3];
423 unsigned short int __old_x[3];
424 unsigned short int __c;
425 unsigned short int __init;
426 unsigned long long int __a;
427 };
428
429
430extern int drand48_r (struct drand48_data *__restrict __buffer,
431 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
432extern int erand48_r (unsigned short int __xsubi[3],
433 struct drand48_data *__restrict __buffer,
434 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
435
436
437extern int lrand48_r (struct drand48_data *__restrict __buffer,
438 long int *__restrict __result)
439 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
440extern int nrand48_r (unsigned short int __xsubi[3],
441 struct drand48_data *__restrict __buffer,
442 long int *__restrict __result)
443 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
444
445
446extern int mrand48_r (struct drand48_data *__restrict __buffer,
447 long int *__restrict __result)
448 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
449extern int jrand48_r (unsigned short int __xsubi[3],
450 struct drand48_data *__restrict __buffer,
451 long int *__restrict __result)
452 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
453
454
455extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
456 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
457
458extern int seed48_r (unsigned short int __seed16v[3],
459 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
460
461extern int lcong48_r (unsigned short int __param[7],
462 struct drand48_data *__buffer)
463 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
464
465
466
467
468
469
470
471
472
473extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
474
475extern void *calloc (size_t __nmemb, size_t __size)
476 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
477
478
479
480
481
482
483
484
485
486
487extern void *realloc (void *__ptr, size_t __size)
488 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
489
490extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
491
492
493
494
495extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
496
497extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
498
499
500
501
502
503
504
505extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
506
507
508
509
510extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
511 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
512
513
514
515
516extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
517
518
519
520extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
521
522extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
523 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
524
525extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
526
527
528extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
529
530
531extern char *getenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
532
533extern char *__secure_getenv (__const char *__name)
534 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
535extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
536extern int setenv (__const char *__name, __const char *__value, int __replace)
537 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
538extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
539extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
540extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
541extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
542extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
543extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
544
545extern int system (__const char *__command) ;
546
547extern char *realpath (__const char *__restrict __name,
548 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) ;
549typedef int (*__compar_fn_t) (__const void *, __const void *);
550
551extern void *bsearch (__const void *__key, __const void *__base,
552 size_t __nmemb, size_t __size, __compar_fn_t __compar)
553 __attribute__ ((__nonnull__ (1, 2, 5))) ;
554extern void qsort (void *__base, size_t __nmemb, size_t __size,
555 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
556extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
557extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
558
559__extension__ extern long long int llabs (long long int __x)
560 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
561
562extern div_t div (int __numer, int __denom)
563 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
564extern ldiv_t ldiv (long int __numer, long int __denom)
565 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
566
567
568__extension__ extern lldiv_t lldiv (long long int __numer,
569 long long int __denom)
570 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
571
572extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
573 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
574extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
575 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
576extern char *gcvt (double __value, int __ndigit, char *__buf)
577 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
578extern char *qecvt (long double __value, int __ndigit,
579 int *__restrict __decpt, int *__restrict __sign)
580 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
581extern char *qfcvt (long double __value, int __ndigit,
582 int *__restrict __decpt, int *__restrict __sign)
583 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
584extern char *qgcvt (long double __value, int __ndigit, char *__buf)
585 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
586extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
587 int *__restrict __sign, char *__restrict __buf,
588 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
589extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
590 int *__restrict __sign, char *__restrict __buf,
591 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
592extern int qecvt_r (long double __value, int __ndigit,
593 int *__restrict __decpt, int *__restrict __sign,
594 char *__restrict __buf, size_t __len)
595 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
596extern int qfcvt_r (long double __value, int __ndigit,
597 int *__restrict __decpt, int *__restrict __sign,
598 char *__restrict __buf, size_t __len)
599 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
600
601extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) ;
602extern int mbtowc (wchar_t *__restrict __pwc,
603 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) ;
604extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)) ;
605extern size_t mbstowcs (wchar_t *__restrict __pwcs,
606 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
607extern size_t wcstombs (char *__restrict __s,
608 __const wchar_t *__restrict __pwcs, size_t __n)
609 __attribute__ ((__nothrow__ , __leaf__));
610
611extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
612extern int getsubopt (char **__restrict __optionp,
613 char *__const *__restrict __tokens,
614 char **__restrict __valuep)
615 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
616extern int getloadavg (double __loadavg[], int __nelem)
617 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
618
619struct sched_param
620 {
621 int __sched_priority;
622 };
623
624
625struct __sched_param
626 {
627 int __sched_priority;
628 };
629typedef unsigned long int __cpu_mask;
630typedef struct
631{
632 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
633} cpu_set_t;
634
635extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
636 __attribute__ ((__nothrow__ , __leaf__));
637extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) ;
638extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
639
640
641extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
642 __attribute__ ((__nothrow__ , __leaf__));
643extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
644extern int sched_setscheduler (__pid_t __pid, int __policy,
645 __const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
646extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
647extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
648extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
649extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
650extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
651
652
653
654struct tm
655{
656 int tm_sec;
657 int tm_min;
658 int tm_hour;
659 int tm_mday;
660 int tm_mon;
661 int tm_year;
662 int tm_wday;
663 int tm_yday;
664 int tm_isdst;
665 long int tm_gmtoff;
666 __const char *tm_zone;
667};
668
669
670struct itimerspec
671 {
672 struct timespec it_interval;
673 struct timespec it_value;
674 };
675struct sigevent;
676
677extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
678extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
679extern double difftime (time_t __time1, time_t __time0)
680 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
681extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
682extern size_t strftime (char *__restrict __s, size_t __maxsize,
683 __const char *__restrict __format,
684 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
685
686typedef struct __locale_struct
687{
688 struct __locale_data *__locales[13];
689 const unsigned short int *__ctype_b;
690 const int *__ctype_tolower;
691 const int *__ctype_toupper;
692 const char *__names[13];
693} *__locale_t;
694typedef __locale_t locale_t;
695extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
696 __const char *__restrict __format,
697 __const struct tm *__restrict __tp,
698 __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
699
700extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
701extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
702
703extern struct tm *gmtime_r (__const time_t *__restrict __timer,
704 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
705extern struct tm *localtime_r (__const time_t *__restrict __timer,
706 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
707
708extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
709extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
710
711extern char *asctime_r (__const struct tm *__restrict __tp,
712 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
713extern char *ctime_r (__const time_t *__restrict __timer,
714 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
715extern char *__tzname[2];
716extern int __daylight;
717extern long int __timezone;
718extern char *tzname[2];
719extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
720extern int daylight;
721extern long int timezone;
722extern int stime (__const time_t *__when) __attribute__ ((__nothrow__ , __leaf__));
723extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
724extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
725extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
726extern int nanosleep (__const struct timespec *__requested_time,
727 struct timespec *__remaining);
728extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
729extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
730extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
731 __attribute__ ((__nothrow__ , __leaf__));
732extern int clock_nanosleep (clockid_t __clock_id, int __flags,
733 __const struct timespec *__req,
734 struct timespec *__rem);
735extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
736extern int timer_create (clockid_t __clock_id,
737 struct sigevent *__restrict __evp,
738 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
739extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
740extern int timer_settime (timer_t __timerid, int __flags,
741 __const struct itimerspec *__restrict __value,
742 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
743extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
744 __attribute__ ((__nothrow__ , __leaf__));
745extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
746
747typedef long int __jmp_buf[8];
748enum
749{
750 PTHREAD_CREATE_JOINABLE,
751 PTHREAD_CREATE_DETACHED
752};
753enum
754{
755 PTHREAD_MUTEX_TIMED_NP,
756 PTHREAD_MUTEX_RECURSIVE_NP,
757 PTHREAD_MUTEX_ERRORCHECK_NP,
758 PTHREAD_MUTEX_ADAPTIVE_NP
759 ,
760 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
761 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
762 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
763 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
764};
765enum
766{
767 PTHREAD_MUTEX_STALLED,
768 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
769 PTHREAD_MUTEX_ROBUST,
770 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
771};
772enum
773{
774 PTHREAD_RWLOCK_PREFER_READER_NP,
775 PTHREAD_RWLOCK_PREFER_WRITER_NP,
776 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
777 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
778};
779enum
780{
781 PTHREAD_INHERIT_SCHED,
782 PTHREAD_EXPLICIT_SCHED
783};
784enum
785{
786 PTHREAD_SCOPE_SYSTEM,
787 PTHREAD_SCOPE_PROCESS
788};
789enum
790{
791 PTHREAD_PROCESS_PRIVATE,
792 PTHREAD_PROCESS_SHARED
793};
794struct _pthread_cleanup_buffer
795{
796 void (*__routine) (void *);
797 void *__arg;
798 int __canceltype;
799 struct _pthread_cleanup_buffer *__prev;
800};
801enum
802{
803 PTHREAD_CANCEL_ENABLE,
804 PTHREAD_CANCEL_DISABLE
805};
806enum
807{
808 PTHREAD_CANCEL_DEFERRED,
809 PTHREAD_CANCEL_ASYNCHRONOUS
810};
811
812extern int pthread_create (pthread_t *__restrict __newthread,
813 __const pthread_attr_t *__restrict __attr,
814 void *(*__start_routine) (void *),
815 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
816extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
817extern int pthread_join (pthread_t __th, void **__thread_return);
818extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
819extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
820extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__ , __leaf__));
821extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
822extern int pthread_attr_destroy (pthread_attr_t *__attr)
823 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
824extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
825 int *__detachstate)
826 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
827extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
828 int __detachstate)
829 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
830extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
831 size_t *__guardsize)
832 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
833extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
834 size_t __guardsize)
835 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
836extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
837 __attr,
838 struct sched_param *__restrict __param)
839 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
840extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
841 __const struct sched_param *__restrict
842 __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
843extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
844 __attr, int *__restrict __policy)
845 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
846extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
847 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
848extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
849 __attr, int *__restrict __inherit)
850 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
851extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
852 int __inherit)
853 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
854extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
855 int *__restrict __scope)
856 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
857extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
858 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
859extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
860 __attr, void **__restrict __stackaddr)
861 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
862extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
863 void *__stackaddr)
864 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
865extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
866 __attr, size_t *__restrict __stacksize)
867 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
868extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
869 size_t __stacksize)
870 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
871extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
872 void **__restrict __stackaddr,
873 size_t *__restrict __stacksize)
874 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
875extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
876 size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
877extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
878 __const struct sched_param *__param)
879 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
880extern int pthread_getschedparam (pthread_t __target_thread,
881 int *__restrict __policy,
882 struct sched_param *__restrict __param)
883 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
884extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
885 __attribute__ ((__nothrow__ , __leaf__));
886extern int pthread_once (pthread_once_t *__once_control,
887 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
888extern int pthread_setcancelstate (int __state, int *__oldstate);
889extern int pthread_setcanceltype (int __type, int *__oldtype);
890extern int pthread_cancel (pthread_t __th);
891extern void pthread_testcancel (void);
892typedef struct
893{
894 struct
895 {
896 __jmp_buf __cancel_jmp_buf;
897 int __mask_was_saved;
898 } __cancel_jmp_buf[1];
899 void *__pad[4];
900} __pthread_unwind_buf_t __attribute__ ((__aligned__));
901struct __pthread_cleanup_frame
902{
903 void (*__cancel_routine) (void *);
904 void *__cancel_arg;
905 int __do_it;
906 int __cancel_type;
907};
908extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
909 ;
910extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
911 ;
912extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
913 __attribute__ ((__noreturn__))
914 __attribute__ ((__weak__))
915 ;
916struct __jmp_buf_tag;
917extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__ , __leaf__));
918extern int pthread_mutex_init (pthread_mutex_t *__mutex,
919 __const pthread_mutexattr_t *__mutexattr)
920 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
921extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
922 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
923extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
924 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
925extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
926 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
927extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
928 __const struct timespec *__restrict
929 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
930extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
931 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
932extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
933 __restrict __mutex,
934 int *__restrict __prioceiling)
935 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
936extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
937 int __prioceiling,
938 int *__restrict __old_ceiling)
939 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
940extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
941 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
942extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
943 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
944extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
945 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
946extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
947 __restrict __attr,
948 int *__restrict __pshared)
949 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
950extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
951 int __pshared)
952 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
953extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
954 __attr, int *__restrict __kind)
955 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
956extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
957 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
958extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
959 __restrict __attr,
960 int *__restrict __protocol)
961 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
962extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
963 int __protocol)
964 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
965extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
966 __restrict __attr,
967 int *__restrict __prioceiling)
968 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
969extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
970 int __prioceiling)
971 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
972extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
973 int *__robustness)
974 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
975extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
976 int __robustness)
977 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
978extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
979 __const pthread_rwlockattr_t *__restrict
980 __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
981extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
982 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
983extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
984 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
985extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
986 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
987extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
988 __const struct timespec *__restrict
989 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
990extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
991 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
992extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
993 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
994extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
995 __const struct timespec *__restrict
996 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
997extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
998 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
999extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
1000 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1001extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
1002 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1003extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
1004 __restrict __attr,
1005 int *__restrict __pshared)
1006 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1007extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
1008 int __pshared)
1009 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1010extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
1011 __restrict __attr,
1012 int *__restrict __pref)
1013 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1014extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
1015 int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1016extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
1017 __const pthread_condattr_t *__restrict
1018 __cond_attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1019extern int pthread_cond_destroy (pthread_cond_t *__cond)
1020 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1021extern int pthread_cond_signal (pthread_cond_t *__cond)
1022 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1023extern int pthread_cond_broadcast (pthread_cond_t *__cond)
1024 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1025extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
1026 pthread_mutex_t *__restrict __mutex)
1027 __attribute__ ((__nonnull__ (1, 2)));
1028extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
1029 pthread_mutex_t *__restrict __mutex,
1030 __const struct timespec *__restrict
1031 __abstime) __attribute__ ((__nonnull__ (1, 2, 3)));
1032extern int pthread_condattr_init (pthread_condattr_t *__attr)
1033 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1034extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
1035 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1036extern int pthread_condattr_getpshared (__const pthread_condattr_t *
1037 __restrict __attr,
1038 int *__restrict __pshared)
1039 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1040extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
1041 int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1042extern int pthread_condattr_getclock (__const pthread_condattr_t *
1043 __restrict __attr,
1044 __clockid_t *__restrict __clock_id)
1045 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1046extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
1047 __clockid_t __clock_id)
1048 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1049extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
1050 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1051extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
1052 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1053extern int pthread_spin_lock (pthread_spinlock_t *__lock)
1054 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1055extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
1056 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1057extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
1058 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1059extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
1060 __const pthread_barrierattr_t *__restrict
1061 __attr, unsigned int __count)
1062 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1063extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
1064 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1065extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
1066 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1067
1068
1069extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
1070 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1071
1072
1073extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
1074 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1075
1076
1077extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
1078 __restrict __attr,
1079 int *__restrict __pshared)
1080 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1081
1082
1083extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
1084 int __pshared)
1085 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1086extern int pthread_key_create (pthread_key_t *__key,
1087 void (*__destr_function) (void *))
1088 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1089extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
1090extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
1091extern int pthread_setspecific (pthread_key_t __key,
1092 __const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ;
1093extern int pthread_getcpuclockid (pthread_t __thread_id,
1094 __clockid_t *__clock_id)
1095 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1096extern int pthread_atfork (void (*__prepare) (void),
1097 void (*__parent) (void),
1098 void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
1099
1100
1101
1102extern void *memcpy (void *__restrict __dest,
1103 __const void *__restrict __src, size_t __n)
1104 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1105extern void *memmove (void *__dest, __const void *__src, size_t __n)
1106 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1107
1108extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
1109 int __c, size_t __n)
1110 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1111
1112extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1113extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
1114 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1115extern void *memchr (__const void *__s, int __c, size_t __n)
1116 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1117
1118
1119extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
1120 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1121extern char *strncpy (char *__restrict __dest,
1122 __const char *__restrict __src, size_t __n)
1123 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1124extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
1125 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1126extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
1127 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1128extern int strcmp (__const char *__s1, __const char *__s2)
1129 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1130extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
1131 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1132extern int strcoll (__const char *__s1, __const char *__s2)
1133 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1134extern size_t strxfrm (char *__restrict __dest,
1135 __const char *__restrict __src, size_t __n)
1136 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1137
1138extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
1139 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1140extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
1141 __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
1142extern char *strdup (__const char *__s)
1143 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1144extern char *strndup (__const char *__string, size_t __n)
1145 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1146
1147extern char *strchr (__const char *__s, int __c)
1148 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1149extern char *strrchr (__const char *__s, int __c)
1150 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1151
1152
1153extern size_t strcspn (__const char *__s, __const char *__reject)
1154 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1155extern size_t strspn (__const char *__s, __const char *__accept)
1156 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1157extern char *strpbrk (__const char *__s, __const char *__accept)
1158 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1159extern char *strstr (__const char *__haystack, __const char *__needle)
1160 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1161extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
1162 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1163
1164extern char *__strtok_r (char *__restrict __s,
1165 __const char *__restrict __delim,
1166 char **__restrict __save_ptr)
1167 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1168extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
1169 char **__restrict __save_ptr)
1170 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1171
1172extern size_t strlen (__const char *__s)
1173 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1174
1175extern size_t strnlen (__const char *__string, size_t __maxlen)
1176 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1177
1178extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
1179
1180extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1181extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
1182extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1183extern void bcopy (__const void *__src, void *__dest, size_t __n)
1184 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1185extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1186extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
1187 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1188extern char *index (__const char *__s, int __c)
1189 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1190extern char *rindex (__const char *__s, int __c)
1191 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1192extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1193extern int strcasecmp (__const char *__s1, __const char *__s2)
1194 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1195extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
1196 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1197extern char *strsep (char **__restrict __stringp,
1198 __const char *__restrict __delim)
1199 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1200extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1201extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
1202 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1203extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
1204 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1205extern char *__stpncpy (char *__restrict __dest,
1206 __const char *__restrict __src, size_t __n)
1207 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1208extern char *stpncpy (char *__restrict __dest,
1209 __const char *__restrict __src, size_t __n)
1210 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1211
1212void __VERIFIER_assert(int expression) { if (!expression) { ERROR: __VERIFIER_error();}; return; }
1213char *v;
1214void *thread1(void * arg)
1215{
1216 v = malloc(sizeof(char));
1217 return 0;
1218}
1219void *thread2(void *arg)
1220{
1221 v[0] = 'X';
1222 return 0;
1223}
1224void *thread3(void *arg)
1225{
1226 v[0] = 'Y';
1227 return 0;
1228}
1229void *thread0(void *arg)
1230{
1231 pthread_t t1, t2, t3, t4, t5;
1232 pthread_create(&t1, 0, thread1, 0);
1233 pthread_join(t1, 0);
1234 pthread_create(&t2, 0, thread2, 0);
1235 pthread_create(&t3, 0, thread3, 0);
1236 pthread_create(&t4, 0, thread2, 0);
1237 pthread_create(&t5, 0, thread2, 0);
1238 pthread_join(t2, 0);
1239 pthread_join(t3, 0);
1240 pthread_join(t4, 0);
1241 pthread_join(t5, 0);
1242 return 0;
1243}
1244int main(void)
1245{
1246 pthread_t t;
1247 pthread_create(&t, 0, thread0, 0);
1248 pthread_join(t, 0);
1249 __VERIFIER_assert(v[0] == 'X');
1250 return 0;
1251}
Note: See TracBrowser for help on using the repository browser.