source: CIVL/examples/pthread/svcomp/sync01_true-unreach-call.i@ 1aaefd4

main test-branch
Last change on this file since 1aaefd4 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: 44.7 KB
Line 
1extern void __VERIFIER_error() __attribute__ ((__noreturn__));
2
3# 1 "sync01.c"
4# 1 "<built-in>"
5# 1 "<command-line>"
6# 1 "sync01.c"
7# 1 "/usr/include/stdio.h" 1 3 4
8# 28 "/usr/include/stdio.h" 3 4
9# 1 "/usr/include/features.h" 1 3 4
10# 363 "/usr/include/features.h" 3 4
11# 1 "/usr/include/sys/cdefs.h" 1 3 4
12# 372 "/usr/include/sys/cdefs.h" 3 4
13# 1 "/usr/include/bits/wordsize.h" 1 3 4
14# 373 "/usr/include/sys/cdefs.h" 2 3 4
15# 364 "/usr/include/features.h" 2 3 4
16# 387 "/usr/include/features.h" 3 4
17# 1 "/usr/include/gnu/stubs.h" 1 3 4
18
19
20
21# 1 "/usr/include/bits/wordsize.h" 1 3 4
22# 5 "/usr/include/gnu/stubs.h" 2 3 4
23
24
25# 1 "/usr/include/gnu/stubs-32.h" 1 3 4
26# 8 "/usr/include/gnu/stubs.h" 2 3 4
27# 388 "/usr/include/features.h" 2 3 4
28# 29 "/usr/include/stdio.h" 2 3 4
29
30
31
32
33
34# 1 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stddef.h" 1 3 4
35# 212 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stddef.h" 3 4
36typedef unsigned int size_t;
37# 35 "/usr/include/stdio.h" 2 3 4
38
39# 1 "/usr/include/bits/types.h" 1 3 4
40# 28 "/usr/include/bits/types.h" 3 4
41# 1 "/usr/include/bits/wordsize.h" 1 3 4
42# 29 "/usr/include/bits/types.h" 2 3 4
43
44
45typedef unsigned char __u_char;
46typedef unsigned short int __u_short;
47typedef unsigned int __u_int;
48typedef unsigned long int __u_long;
49
50
51typedef signed char __int8_t;
52typedef unsigned char __uint8_t;
53typedef signed short int __int16_t;
54typedef unsigned short int __uint16_t;
55typedef signed int __int32_t;
56typedef unsigned int __uint32_t;
57
58
59
60
61__extension__ typedef signed long long int __int64_t;
62__extension__ typedef unsigned long long int __uint64_t;
63
64
65
66
67
68
69
70__extension__ typedef long long int __quad_t;
71__extension__ typedef unsigned long long int __u_quad_t;
72# 131 "/usr/include/bits/types.h" 3 4
73# 1 "/usr/include/bits/typesizes.h" 1 3 4
74# 132 "/usr/include/bits/types.h" 2 3 4
75
76
77__extension__ typedef __u_quad_t __dev_t;
78__extension__ typedef unsigned int __uid_t;
79__extension__ typedef unsigned int __gid_t;
80__extension__ typedef unsigned long int __ino_t;
81__extension__ typedef __u_quad_t __ino64_t;
82__extension__ typedef unsigned int __mode_t;
83__extension__ typedef unsigned int __nlink_t;
84__extension__ typedef long int __off_t;
85__extension__ typedef __quad_t __off64_t;
86__extension__ typedef int __pid_t;
87__extension__ typedef struct { int __val[2]; } __fsid_t;
88__extension__ typedef long int __clock_t;
89__extension__ typedef unsigned long int __rlim_t;
90__extension__ typedef __u_quad_t __rlim64_t;
91__extension__ typedef unsigned int __id_t;
92__extension__ typedef long int __time_t;
93__extension__ typedef unsigned int __useconds_t;
94__extension__ typedef long int __suseconds_t;
95
96__extension__ typedef int __daddr_t;
97__extension__ typedef long int __swblk_t;
98__extension__ typedef int __key_t;
99
100
101__extension__ typedef int __clockid_t;
102
103
104__extension__ typedef void * __timer_t;
105
106
107__extension__ typedef long int __blksize_t;
108
109
110
111
112__extension__ typedef long int __blkcnt_t;
113__extension__ typedef __quad_t __blkcnt64_t;
114
115
116__extension__ typedef unsigned long int __fsblkcnt_t;
117__extension__ typedef __u_quad_t __fsblkcnt64_t;
118
119
120__extension__ typedef unsigned long int __fsfilcnt_t;
121__extension__ typedef __u_quad_t __fsfilcnt64_t;
122
123__extension__ typedef int __ssize_t;
124
125
126
127typedef __off64_t __loff_t;
128typedef __quad_t *__qaddr_t;
129typedef char *__caddr_t;
130
131
132__extension__ typedef int __intptr_t;
133
134
135__extension__ typedef unsigned int __socklen_t;
136# 37 "/usr/include/stdio.h" 2 3 4
137# 45 "/usr/include/stdio.h" 3 4
138struct _IO_FILE;
139
140
141
142typedef struct _IO_FILE FILE;
143
144
145
146
147
148# 65 "/usr/include/stdio.h" 3 4
149typedef struct _IO_FILE __FILE;
150# 75 "/usr/include/stdio.h" 3 4
151# 1 "/usr/include/libio.h" 1 3 4
152# 32 "/usr/include/libio.h" 3 4
153# 1 "/usr/include/_G_config.h" 1 3 4
154# 15 "/usr/include/_G_config.h" 3 4
155# 1 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stddef.h" 1 3 4
156# 16 "/usr/include/_G_config.h" 2 3 4
157
158
159
160
161# 1 "/usr/include/wchar.h" 1 3 4
162# 83 "/usr/include/wchar.h" 3 4
163typedef struct
164{
165 int __count;
166 union
167 {
168
169 unsigned int __wch;
170
171
172
173 char __wchb[4];
174 } __value;
175} __mbstate_t;
176# 21 "/usr/include/_G_config.h" 2 3 4
177
178typedef struct
179{
180 __off_t __pos;
181 __mbstate_t __state;
182} _G_fpos_t;
183typedef struct
184{
185 __off64_t __pos;
186 __mbstate_t __state;
187} _G_fpos64_t;
188# 53 "/usr/include/_G_config.h" 3 4
189typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
190typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
191typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
192typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
193# 33 "/usr/include/libio.h" 2 3 4
194# 53 "/usr/include/libio.h" 3 4
195# 1 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stdarg.h" 1 3 4
196# 40 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stdarg.h" 3 4
197typedef __builtin_va_list __gnuc_va_list;
198# 54 "/usr/include/libio.h" 2 3 4
199# 172 "/usr/include/libio.h" 3 4
200struct _IO_jump_t; struct _IO_FILE;
201# 182 "/usr/include/libio.h" 3 4
202typedef void _IO_lock_t;
203
204
205
206
207
208struct _IO_marker {
209 struct _IO_marker *_next;
210 struct _IO_FILE *_sbuf;
211
212
213
214 int _pos;
215# 205 "/usr/include/libio.h" 3 4
216};
217
218
219enum __codecvt_result
220{
221 __codecvt_ok,
222 __codecvt_partial,
223 __codecvt_error,
224 __codecvt_noconv
225};
226# 273 "/usr/include/libio.h" 3 4
227struct _IO_FILE {
228 int _flags;
229
230
231
232
233 char* _IO_read_ptr;
234 char* _IO_read_end;
235 char* _IO_read_base;
236 char* _IO_write_base;
237 char* _IO_write_ptr;
238 char* _IO_write_end;
239 char* _IO_buf_base;
240 char* _IO_buf_end;
241
242 char *_IO_save_base;
243 char *_IO_backup_base;
244 char *_IO_save_end;
245
246 struct _IO_marker *_markers;
247
248 struct _IO_FILE *_chain;
249
250 int _fileno;
251
252
253
254 int _flags2;
255
256 __off_t _old_offset;
257
258
259
260 unsigned short _cur_column;
261 signed char _vtable_offset;
262 char _shortbuf[1];
263
264
265
266 _IO_lock_t *_lock;
267# 321 "/usr/include/libio.h" 3 4
268 __off64_t _offset;
269# 330 "/usr/include/libio.h" 3 4
270 void *__pad1;
271 void *__pad2;
272 void *__pad3;
273 void *__pad4;
274 size_t __pad5;
275
276 int _mode;
277
278 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
279
280};
281
282
283typedef struct _IO_FILE _IO_FILE;
284
285
286struct _IO_FILE_plus;
287
288extern struct _IO_FILE_plus _IO_2_1_stdin_;
289extern struct _IO_FILE_plus _IO_2_1_stdout_;
290extern struct _IO_FILE_plus _IO_2_1_stderr_;
291# 366 "/usr/include/libio.h" 3 4
292typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
293
294
295
296
297
298
299
300typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
301 size_t __n);
302
303
304
305
306
307
308
309typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
310
311
312typedef int __io_close_fn (void *__cookie);
313# 418 "/usr/include/libio.h" 3 4
314extern int __underflow (_IO_FILE *);
315extern int __uflow (_IO_FILE *);
316extern int __overflow (_IO_FILE *, int);
317# 462 "/usr/include/libio.h" 3 4
318extern int _IO_getc (_IO_FILE *__fp);
319extern int _IO_putc (int __c, _IO_FILE *__fp);
320extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
321extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
322
323extern int _IO_peekc_locked (_IO_FILE *__fp);
324
325
326
327
328
329extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
330extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
331extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
332# 492 "/usr/include/libio.h" 3 4
333extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
334 __gnuc_va_list, int *__restrict);
335extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
336 __gnuc_va_list);
337extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
338extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
339
340extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
341extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
342
343extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
344# 76 "/usr/include/stdio.h" 2 3 4
345
346
347
348
349typedef __gnuc_va_list va_list;
350# 91 "/usr/include/stdio.h" 3 4
351typedef __off_t off_t;
352# 103 "/usr/include/stdio.h" 3 4
353typedef __ssize_t ssize_t;
354
355
356
357
358
359
360
361typedef _G_fpos_t fpos_t;
362
363
364
365
366# 165 "/usr/include/stdio.h" 3 4
367# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
368# 166 "/usr/include/stdio.h" 2 3 4
369
370
371
372extern struct _IO_FILE *stdin;
373extern struct _IO_FILE *stdout;
374extern struct _IO_FILE *stderr;
375
376
377
378
379
380
381
382
383
384extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
385
386extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
387
388
389
390
391extern int renameat (int __oldfd, __const char *__old, int __newfd,
392 __const char *__new) __attribute__ ((__nothrow__));
393
394
395
396
397
398
399
400
401extern FILE *tmpfile (void) ;
402# 212 "/usr/include/stdio.h" 3 4
403extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ;
404
405
406
407
408
409extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ;
410# 230 "/usr/include/stdio.h" 3 4
411extern char *tempnam (__const char *__dir, __const char *__pfx)
412 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
413
414
415
416
417
418
419
420
421extern int fclose (FILE *__stream);
422
423
424
425
426extern int fflush (FILE *__stream);
427
428# 255 "/usr/include/stdio.h" 3 4
429extern int fflush_unlocked (FILE *__stream);
430# 269 "/usr/include/stdio.h" 3 4
431
432
433
434
435
436
437extern FILE *fopen (__const char *__restrict __filename,
438 __const char *__restrict __modes) ;
439
440
441
442
443extern FILE *freopen (__const char *__restrict __filename,
444 __const char *__restrict __modes,
445 FILE *__restrict __stream) ;
446# 298 "/usr/include/stdio.h" 3 4
447
448# 309 "/usr/include/stdio.h" 3 4
449extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ;
450# 322 "/usr/include/stdio.h" 3 4
451extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
452 __attribute__ ((__nothrow__)) ;
453
454
455
456
457extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ;
458
459
460
461
462
463
464extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
465
466
467
468extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
469 int __modes, size_t __n) __attribute__ ((__nothrow__));
470
471
472
473
474
475extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
476 size_t __size) __attribute__ ((__nothrow__));
477
478
479extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
480
481
482
483
484
485
486
487
488extern int fprintf (FILE *__restrict __stream,
489 __const char *__restrict __format, ...);
490
491
492
493
494extern int printf (__const char *__restrict __format, ...);
495
496extern int sprintf (char *__restrict __s,
497 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
498
499
500
501
502
503extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
504 __gnuc_va_list __arg);
505
506
507
508
509extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
510
511extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
512 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
513
514
515
516
517
518extern int snprintf (char *__restrict __s, size_t __maxlen,
519 __const char *__restrict __format, ...)
520 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
521
522extern int vsnprintf (char *__restrict __s, size_t __maxlen,
523 __const char *__restrict __format, __gnuc_va_list __arg)
524 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
525
526# 420 "/usr/include/stdio.h" 3 4
527extern int vdprintf (int __fd, __const char *__restrict __fmt,
528 __gnuc_va_list __arg)
529 __attribute__ ((__format__ (__printf__, 2, 0)));
530extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
531 __attribute__ ((__format__ (__printf__, 2, 3)));
532
533
534
535
536
537
538
539
540extern int fscanf (FILE *__restrict __stream,
541 __const char *__restrict __format, ...) ;
542
543
544
545
546extern int scanf (__const char *__restrict __format, ...) ;
547
548extern int sscanf (__const char *__restrict __s,
549 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
550# 451 "/usr/include/stdio.h" 3 4
551extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf")
552
553 ;
554extern int scanf (__const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf")
555 ;
556extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__))
557
558 ;
559# 471 "/usr/include/stdio.h" 3 4
560
561
562
563
564
565
566
567
568extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
569 __gnuc_va_list __arg)
570 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
571
572
573
574
575
576extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
577 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
578
579
580extern int vsscanf (__const char *__restrict __s,
581 __const char *__restrict __format, __gnuc_va_list __arg)
582 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
583# 502 "/usr/include/stdio.h" 3 4
584extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
585
586
587
588 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
589extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
590
591 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
592extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__))
593
594
595
596 __attribute__ ((__format__ (__scanf__, 2, 0)));
597# 530 "/usr/include/stdio.h" 3 4
598
599
600
601
602
603
604
605
606
607extern int fgetc (FILE *__stream);
608extern int getc (FILE *__stream);
609
610
611
612
613
614extern int getchar (void);
615
616# 558 "/usr/include/stdio.h" 3 4
617extern int getc_unlocked (FILE *__stream);
618extern int getchar_unlocked (void);
619# 569 "/usr/include/stdio.h" 3 4
620extern int fgetc_unlocked (FILE *__stream);
621
622
623
624
625
626
627
628
629
630
631
632extern int fputc (int __c, FILE *__stream);
633extern int putc (int __c, FILE *__stream);
634
635
636
637
638
639extern int putchar (int __c);
640
641# 602 "/usr/include/stdio.h" 3 4
642extern int fputc_unlocked (int __c, FILE *__stream);
643
644
645
646
647
648
649
650extern int putc_unlocked (int __c, FILE *__stream);
651extern int putchar_unlocked (int __c);
652
653
654
655
656
657
658extern int getw (FILE *__stream);
659
660
661extern int putw (int __w, FILE *__stream);
662
663
664
665
666
667
668
669
670extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
671 ;
672
673
674
675
676
677
678extern char *gets (char *__s) ;
679
680# 664 "/usr/include/stdio.h" 3 4
681extern __ssize_t __getdelim (char **__restrict __lineptr,
682 size_t *__restrict __n, int __delimiter,
683 FILE *__restrict __stream) ;
684extern __ssize_t getdelim (char **__restrict __lineptr,
685 size_t *__restrict __n, int __delimiter,
686 FILE *__restrict __stream) ;
687
688
689
690
691
692
693
694extern __ssize_t getline (char **__restrict __lineptr,
695 size_t *__restrict __n,
696 FILE *__restrict __stream) ;
697
698
699
700
701
702
703
704
705extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
706
707
708
709
710
711extern int puts (__const char *__s);
712
713
714
715
716
717
718extern int ungetc (int __c, FILE *__stream);
719
720
721
722
723
724
725extern size_t fread (void *__restrict __ptr, size_t __size,
726 size_t __n, FILE *__restrict __stream) ;
727
728
729
730
731extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
732 size_t __n, FILE *__restrict __s) ;
733
734# 736 "/usr/include/stdio.h" 3 4
735extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
736 size_t __n, FILE *__restrict __stream) ;
737extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
738 size_t __n, FILE *__restrict __stream) ;
739
740
741
742
743
744
745
746
747extern int fseek (FILE *__stream, long int __off, int __whence);
748
749
750
751
752extern long int ftell (FILE *__stream) ;
753
754
755
756
757extern void rewind (FILE *__stream);
758
759# 772 "/usr/include/stdio.h" 3 4
760extern int fseeko (FILE *__stream, __off_t __off, int __whence);
761
762
763
764
765extern __off_t ftello (FILE *__stream) ;
766# 791 "/usr/include/stdio.h" 3 4
767
768
769
770
771
772
773extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
774
775
776
777
778extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
779# 814 "/usr/include/stdio.h" 3 4
780
781# 823 "/usr/include/stdio.h" 3 4
782
783
784extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
785
786extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;
787
788extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;
789
790
791
792
793extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
794extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
795extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
796
797
798
799
800
801
802
803
804extern void perror (__const char *__s);
805
806
807
808
809
810
811# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
812# 27 "/usr/include/bits/sys_errlist.h" 3 4
813extern int sys_nerr;
814extern __const char *__const sys_errlist[];
815# 853 "/usr/include/stdio.h" 2 3 4
816
817
818
819
820extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;
821
822
823
824
825extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
826# 872 "/usr/include/stdio.h" 3 4
827extern FILE *popen (__const char *__command, __const char *__modes) ;
828
829
830
831
832
833extern int pclose (FILE *__stream);
834
835
836
837
838
839extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
840# 912 "/usr/include/stdio.h" 3 4
841extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
842
843
844
845extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;
846
847
848extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
849# 942 "/usr/include/stdio.h" 3 4
850
851# 2 "sync01.c" 2
852# 1 "/usr/include/pthread.h" 1 3 4
853# 24 "/usr/include/pthread.h" 3 4
854# 1 "/usr/include/endian.h" 1 3 4
855# 37 "/usr/include/endian.h" 3 4
856# 1 "/usr/include/bits/endian.h" 1 3 4
857# 38 "/usr/include/endian.h" 2 3 4
858# 61 "/usr/include/endian.h" 3 4
859# 1 "/usr/include/bits/byteswap.h" 1 3 4
860# 62 "/usr/include/endian.h" 2 3 4
861# 25 "/usr/include/pthread.h" 2 3 4
862# 1 "/usr/include/sched.h" 1 3 4
863# 30 "/usr/include/sched.h" 3 4
864# 1 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stddef.h" 1 3 4
865# 31 "/usr/include/sched.h" 2 3 4
866
867
868
869# 1 "/usr/include/time.h" 1 3 4
870# 74 "/usr/include/time.h" 3 4
871
872
873typedef __time_t time_t;
874
875
876
877# 120 "/usr/include/time.h" 3 4
878struct timespec
879 {
880 __time_t tv_sec;
881 long int tv_nsec;
882 };
883# 35 "/usr/include/sched.h" 2 3 4
884
885
886typedef __pid_t pid_t;
887
888
889
890
891
892# 1 "/usr/include/bits/sched.h" 1 3 4
893# 74 "/usr/include/bits/sched.h" 3 4
894struct sched_param
895 {
896 int __sched_priority;
897 };
898
899
900# 97 "/usr/include/bits/sched.h" 3 4
901
902
903
904
905
906
907
908
909struct __sched_param
910 {
911 int __sched_priority;
912 };
913# 120 "/usr/include/bits/sched.h" 3 4
914typedef unsigned long int __cpu_mask;
915
916
917
918
919
920
921typedef struct
922{
923 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
924} cpu_set_t;
925# 203 "/usr/include/bits/sched.h" 3 4
926
927
928extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
929 __attribute__ ((__nothrow__));
930extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__)) ;
931extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__));
932
933
934# 44 "/usr/include/sched.h" 2 3 4
935
936
937
938
939
940
941
942extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
943 __attribute__ ((__nothrow__));
944
945
946extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__));
947
948
949extern int sched_setscheduler (__pid_t __pid, int __policy,
950 __const struct sched_param *__param) __attribute__ ((__nothrow__));
951
952
953extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__));
954
955
956extern int sched_yield (void) __attribute__ ((__nothrow__));
957
958
959extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__));
960
961
962extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__));
963
964
965extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__));
966# 126 "/usr/include/sched.h" 3 4
967
968# 26 "/usr/include/pthread.h" 2 3 4
969# 1 "/usr/include/time.h" 1 3 4
970# 30 "/usr/include/time.h" 3 4
971
972
973
974
975
976
977
978
979# 1 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stddef.h" 1 3 4
980# 39 "/usr/include/time.h" 2 3 4
981
982
983
984# 1 "/usr/include/bits/time.h" 1 3 4
985# 43 "/usr/include/time.h" 2 3 4
986# 58 "/usr/include/time.h" 3 4
987
988
989typedef __clock_t clock_t;
990
991
992
993# 92 "/usr/include/time.h" 3 4
994typedef __clockid_t clockid_t;
995# 104 "/usr/include/time.h" 3 4
996typedef __timer_t timer_t;
997# 131 "/usr/include/time.h" 3 4
998
999
1000struct tm
1001{
1002 int tm_sec;
1003 int tm_min;
1004 int tm_hour;
1005 int tm_mday;
1006 int tm_mon;
1007 int tm_year;
1008 int tm_wday;
1009 int tm_yday;
1010 int tm_isdst;
1011
1012
1013 long int tm_gmtoff;
1014 __const char *tm_zone;
1015
1016
1017
1018
1019};
1020
1021
1022
1023
1024
1025
1026
1027
1028struct itimerspec
1029 {
1030 struct timespec it_interval;
1031 struct timespec it_value;
1032 };
1033
1034
1035struct sigevent;
1036# 180 "/usr/include/time.h" 3 4
1037
1038
1039
1040extern clock_t clock (void) __attribute__ ((__nothrow__));
1041
1042
1043extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
1044
1045
1046extern double difftime (time_t __time1, time_t __time0)
1047 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
1048
1049
1050extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
1051
1052
1053
1054
1055
1056extern size_t strftime (char *__restrict __s, size_t __maxsize,
1057 __const char *__restrict __format,
1058 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
1059
1060# 215 "/usr/include/time.h" 3 4
1061# 1 "/usr/include/xlocale.h" 1 3 4
1062# 28 "/usr/include/xlocale.h" 3 4
1063typedef struct __locale_struct
1064{
1065
1066 struct __locale_data *__locales[13];
1067
1068
1069 const unsigned short int *__ctype_b;
1070 const int *__ctype_tolower;
1071 const int *__ctype_toupper;
1072
1073
1074 const char *__names[13];
1075} *__locale_t;
1076
1077
1078typedef __locale_t locale_t;
1079# 216 "/usr/include/time.h" 2 3 4
1080
1081extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
1082 __const char *__restrict __format,
1083 __const struct tm *__restrict __tp,
1084 __locale_t __loc) __attribute__ ((__nothrow__));
1085# 230 "/usr/include/time.h" 3 4
1086
1087
1088
1089extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
1090
1091
1092
1093extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
1094
1095
1096
1097
1098
1099extern struct tm *gmtime_r (__const time_t *__restrict __timer,
1100 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
1101
1102
1103
1104extern struct tm *localtime_r (__const time_t *__restrict __timer,
1105 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
1106
1107
1108
1109
1110
1111extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
1112
1113
1114extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
1115
1116
1117
1118
1119
1120
1121
1122extern char *asctime_r (__const struct tm *__restrict __tp,
1123 char *__restrict __buf) __attribute__ ((__nothrow__));
1124
1125
1126extern char *ctime_r (__const time_t *__restrict __timer,
1127 char *__restrict __buf) __attribute__ ((__nothrow__));
1128
1129
1130
1131
1132extern char *__tzname[2];
1133extern int __daylight;
1134extern long int __timezone;
1135
1136
1137
1138
1139extern char *tzname[2];
1140
1141
1142
1143extern void tzset (void) __attribute__ ((__nothrow__));
1144
1145
1146
1147extern int daylight;
1148extern long int timezone;
1149
1150
1151
1152
1153
1154extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
1155# 313 "/usr/include/time.h" 3 4
1156extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
1157
1158
1159extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
1160
1161
1162extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
1163# 328 "/usr/include/time.h" 3 4
1164extern int nanosleep (__const struct timespec *__requested_time,
1165 struct timespec *__remaining);
1166
1167
1168
1169extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
1170
1171
1172extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
1173
1174
1175extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
1176 __attribute__ ((__nothrow__));
1177
1178
1179
1180
1181
1182
1183extern int clock_nanosleep (clockid_t __clock_id, int __flags,
1184 __const struct timespec *__req,
1185 struct timespec *__rem);
1186
1187
1188extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__));
1189
1190
1191
1192
1193extern int timer_create (clockid_t __clock_id,
1194 struct sigevent *__restrict __evp,
1195 timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
1196
1197
1198extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
1199
1200
1201extern int timer_settime (timer_t __timerid, int __flags,
1202 __const struct itimerspec *__restrict __value,
1203 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
1204
1205
1206extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
1207 __attribute__ ((__nothrow__));
1208
1209
1210extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
1211# 417 "/usr/include/time.h" 3 4
1212
1213# 27 "/usr/include/pthread.h" 2 3 4
1214
1215# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
1216# 36 "/usr/include/bits/pthreadtypes.h" 3 4
1217typedef unsigned long int pthread_t;
1218
1219
1220typedef union
1221{
1222 char __size[36];
1223 long int __align;
1224} pthread_attr_t;
1225
1226
1227typedef struct __pthread_internal_slist
1228{
1229 struct __pthread_internal_slist *__next;
1230} __pthread_slist_t;
1231
1232
1233
1234
1235typedef union
1236{
1237 struct __pthread_mutex_s
1238 {
1239 int __lock;
1240 unsigned int __count;
1241 int __owner;
1242
1243
1244 int __kind;
1245 unsigned int __nusers;
1246 __extension__ union
1247 {
1248 int __spins;
1249 __pthread_slist_t __list;
1250 };
1251 } __data;
1252 char __size[24];
1253 long int __align;
1254} pthread_mutex_t;
1255
1256typedef union
1257{
1258 char __size[4];
1259 long int __align;
1260} pthread_mutexattr_t;
1261
1262
1263
1264
1265typedef union
1266{
1267 struct
1268 {
1269 int __lock;
1270 unsigned int __futex;
1271 __extension__ unsigned long long int __total_seq;
1272 __extension__ unsigned long long int __wakeup_seq;
1273 __extension__ unsigned long long int __woken_seq;
1274 void *__mutex;
1275 unsigned int __nwaiters;
1276 unsigned int __broadcast_seq;
1277 } __data;
1278 char __size[48];
1279 __extension__ long long int __align;
1280} pthread_cond_t;
1281
1282typedef union
1283{
1284 char __size[4];
1285 long int __align;
1286} pthread_condattr_t;
1287
1288
1289
1290typedef unsigned int pthread_key_t;
1291
1292
1293
1294typedef int pthread_once_t;
1295
1296
1297
1298
1299
1300typedef union
1301{
1302 struct
1303 {
1304 int __lock;
1305 unsigned int __nr_readers;
1306 unsigned int __readers_wakeup;
1307 unsigned int __writer_wakeup;
1308 unsigned int __nr_readers_queued;
1309 unsigned int __nr_writers_queued;
1310
1311
1312 unsigned char __flags;
1313 unsigned char __shared;
1314 unsigned char __pad1;
1315 unsigned char __pad2;
1316 int __writer;
1317 } __data;
1318 char __size[32];
1319 long int __align;
1320} pthread_rwlock_t;
1321
1322typedef union
1323{
1324 char __size[8];
1325 long int __align;
1326} pthread_rwlockattr_t;
1327
1328
1329
1330
1331
1332typedef volatile int pthread_spinlock_t;
1333
1334
1335
1336
1337typedef union
1338{
1339 char __size[20];
1340 long int __align;
1341} pthread_barrier_t;
1342
1343typedef union
1344{
1345 char __size[4];
1346 int __align;
1347} pthread_barrierattr_t;
1348# 29 "/usr/include/pthread.h" 2 3 4
1349# 1 "/usr/include/bits/setjmp.h" 1 3 4
1350# 29 "/usr/include/bits/setjmp.h" 3 4
1351typedef int __jmp_buf[6];
1352# 30 "/usr/include/pthread.h" 2 3 4
1353# 1 "/usr/include/bits/wordsize.h" 1 3 4
1354# 31 "/usr/include/pthread.h" 2 3 4
1355
1356
1357
1358enum
1359{
1360 PTHREAD_CREATE_JOINABLE,
1361
1362 PTHREAD_CREATE_DETACHED
1363
1364};
1365
1366
1367
1368enum
1369{
1370 PTHREAD_MUTEX_TIMED_NP,
1371 PTHREAD_MUTEX_RECURSIVE_NP,
1372 PTHREAD_MUTEX_ERRORCHECK_NP,
1373 PTHREAD_MUTEX_ADAPTIVE_NP
1374
1375 ,
1376 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
1377 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
1378 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
1379 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
1380
1381
1382
1383
1384
1385};
1386
1387
1388
1389
1390enum
1391{
1392 PTHREAD_MUTEX_STALLED,
1393 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
1394 PTHREAD_MUTEX_ROBUST,
1395 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
1396};
1397# 115 "/usr/include/pthread.h" 3 4
1398enum
1399{
1400 PTHREAD_RWLOCK_PREFER_READER_NP,
1401 PTHREAD_RWLOCK_PREFER_WRITER_NP,
1402 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
1403 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
1404};
1405# 147 "/usr/include/pthread.h" 3 4
1406enum
1407{
1408 PTHREAD_INHERIT_SCHED,
1409
1410 PTHREAD_EXPLICIT_SCHED
1411
1412};
1413
1414
1415
1416enum
1417{
1418 PTHREAD_SCOPE_SYSTEM,
1419
1420 PTHREAD_SCOPE_PROCESS
1421
1422};
1423
1424
1425
1426enum
1427{
1428 PTHREAD_PROCESS_PRIVATE,
1429
1430 PTHREAD_PROCESS_SHARED
1431
1432};
1433# 182 "/usr/include/pthread.h" 3 4
1434struct _pthread_cleanup_buffer
1435{
1436 void (*__routine) (void *);
1437 void *__arg;
1438 int __canceltype;
1439 struct _pthread_cleanup_buffer *__prev;
1440};
1441
1442
1443enum
1444{
1445 PTHREAD_CANCEL_ENABLE,
1446
1447 PTHREAD_CANCEL_DISABLE
1448
1449};
1450enum
1451{
1452 PTHREAD_CANCEL_DEFERRED,
1453
1454 PTHREAD_CANCEL_ASYNCHRONOUS
1455
1456};
1457# 220 "/usr/include/pthread.h" 3 4
1458
1459
1460
1461
1462
1463extern int pthread_create (pthread_t *__restrict __newthread,
1464 __const pthread_attr_t *__restrict __attr,
1465 void *(*__start_routine) (void *),
1466 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
1467
1468
1469
1470
1471
1472extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
1473
1474
1475
1476
1477
1478
1479
1480extern int pthread_join (pthread_t __th, void **__thread_return);
1481# 263 "/usr/include/pthread.h" 3 4
1482extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__));
1483
1484
1485
1486extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
1487
1488
1489extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__));
1490
1491
1492
1493
1494
1495
1496
1497extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1498
1499
1500extern int pthread_attr_destroy (pthread_attr_t *__attr)
1501 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1502
1503
1504extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
1505 int *__detachstate)
1506 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1507
1508
1509extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
1510 int __detachstate)
1511 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1512
1513
1514
1515extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
1516 size_t *__guardsize)
1517 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1518
1519
1520extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
1521 size_t __guardsize)
1522 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1523
1524
1525
1526extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
1527 __attr,
1528 struct sched_param *__restrict __param)
1529 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1530
1531
1532extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
1533 __const struct sched_param *__restrict
1534 __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1535
1536
1537extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
1538 __attr, int *__restrict __policy)
1539 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1540
1541
1542extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
1543 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1544
1545
1546extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
1547 __attr, int *__restrict __inherit)
1548 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1549
1550
1551extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
1552 int __inherit)
1553 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1554
1555
1556
1557extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
1558 int *__restrict __scope)
1559 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1560
1561
1562extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
1563 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1564
1565
1566extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
1567 __attr, void **__restrict __stackaddr)
1568 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
1569
1570
1571
1572
1573
1574extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
1575 void *__stackaddr)
1576 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
1577
1578
1579extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
1580 __attr, size_t *__restrict __stacksize)
1581 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1582
1583
1584
1585
1586extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
1587 size_t __stacksize)
1588 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1589
1590
1591
1592extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
1593 void **__restrict __stackaddr,
1594 size_t *__restrict __stacksize)
1595 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1596
1597
1598
1599
1600extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
1601 size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1602# 413 "/usr/include/pthread.h" 3 4
1603extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
1604 __const struct sched_param *__param)
1605 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
1606
1607
1608extern int pthread_getschedparam (pthread_t __target_thread,
1609 int *__restrict __policy,
1610 struct sched_param *__restrict __param)
1611 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
1612
1613
1614extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
1615 __attribute__ ((__nothrow__));
1616# 478 "/usr/include/pthread.h" 3 4
1617extern int pthread_once (pthread_once_t *__once_control,
1618 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
1619# 490 "/usr/include/pthread.h" 3 4
1620extern int pthread_setcancelstate (int __state, int *__oldstate);
1621
1622
1623
1624extern int pthread_setcanceltype (int __type, int *__oldtype);
1625
1626
1627extern int pthread_cancel (pthread_t __th);
1628
1629
1630
1631
1632extern void pthread_testcancel (void);
1633
1634
1635
1636
1637typedef struct
1638{
1639 struct
1640 {
1641 __jmp_buf __cancel_jmp_buf;
1642 int __mask_was_saved;
1643 } __cancel_jmp_buf[1];
1644 void *__pad[4];
1645} __pthread_unwind_buf_t __attribute__ ((__aligned__));
1646# 524 "/usr/include/pthread.h" 3 4
1647struct __pthread_cleanup_frame
1648{
1649 void (*__cancel_routine) (void *);
1650 void *__cancel_arg;
1651 int __do_it;
1652 int __cancel_type;
1653};
1654# 664 "/usr/include/pthread.h" 3 4
1655extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
1656 __attribute__ ((__regparm__ (1)));
1657# 676 "/usr/include/pthread.h" 3 4
1658extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
1659 __attribute__ ((__regparm__ (1)));
1660# 717 "/usr/include/pthread.h" 3 4
1661extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
1662 __attribute__ ((__regparm__ (1))) __attribute__ ((__noreturn__))
1663
1664 __attribute__ ((__weak__))
1665
1666 ;
1667
1668
1669
1670struct __jmp_buf_tag;
1671extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
1672
1673
1674
1675
1676
1677extern int pthread_mutex_init (pthread_mutex_t *__mutex,
1678 __const pthread_mutexattr_t *__mutexattr)
1679 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1680
1681
1682extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
1683 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1684
1685
1686extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
1687 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1688
1689
1690extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
1691 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1692
1693
1694
1695extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
1696 __const struct timespec *__restrict
1697 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1698
1699
1700
1701extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
1702 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1703
1704
1705
1706extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
1707 __restrict __mutex,
1708 int *__restrict __prioceiling)
1709 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1710
1711
1712
1713extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
1714 int __prioceiling,
1715 int *__restrict __old_ceiling)
1716 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
1717
1718
1719
1720
1721extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
1722 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1723# 790 "/usr/include/pthread.h" 3 4
1724extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
1725 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1726
1727
1728extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
1729 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1730
1731
1732extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
1733 __restrict __attr,
1734 int *__restrict __pshared)
1735 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1736
1737
1738extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
1739 int __pshared)
1740 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1741
1742
1743
1744extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
1745 __attr, int *__restrict __kind)
1746 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1747
1748
1749
1750
1751extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
1752 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1753
1754
1755
1756extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
1757 __restrict __attr,
1758 int *__restrict __protocol)
1759 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1760
1761
1762
1763extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
1764 int __protocol)
1765 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1766
1767
1768extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
1769 __restrict __attr,
1770 int *__restrict __prioceiling)
1771 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1772
1773
1774extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
1775 int __prioceiling)
1776 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1777
1778
1779
1780extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
1781 int *__robustness)
1782 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1783
1784
1785
1786
1787
1788
1789
1790extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
1791 int __robustness)
1792 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1793# 872 "/usr/include/pthread.h" 3 4
1794extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
1795 __const pthread_rwlockattr_t *__restrict
1796 __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1797
1798
1799extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
1800 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1801
1802
1803extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
1804 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1805
1806
1807extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
1808 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1809
1810
1811
1812extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
1813 __const struct timespec *__restrict
1814 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1815
1816
1817
1818extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
1819 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1820
1821
1822extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
1823 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1824
1825
1826
1827extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
1828 __const struct timespec *__restrict
1829 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1830
1831
1832
1833extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
1834 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1835
1836
1837
1838
1839
1840extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
1841 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1842
1843
1844extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
1845 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1846
1847
1848extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
1849 __restrict __attr,
1850 int *__restrict __pshared)
1851 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1852
1853
1854extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
1855 int __pshared)
1856 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1857
1858
1859extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
1860 __restrict __attr,
1861 int *__restrict __pref)
1862 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1863
1864
1865extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
1866 int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1867
1868
1869
1870
1871
1872
1873
1874extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
1875 __const pthread_condattr_t *__restrict
1876 __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1877
1878
1879extern int pthread_cond_destroy (pthread_cond_t *__cond)
1880 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1881
1882
1883extern int pthread_cond_signal (pthread_cond_t *__cond)
1884 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1885
1886
1887extern int pthread_cond_broadcast (pthread_cond_t *__cond)
1888 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1889
1890
1891
1892
1893
1894
1895extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
1896 pthread_mutex_t *__restrict __mutex)
1897 __attribute__ ((__nonnull__ (1, 2)));
1898# 984 "/usr/include/pthread.h" 3 4
1899extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
1900 pthread_mutex_t *__restrict __mutex,
1901 __const struct timespec *__restrict
1902 __abstime) __attribute__ ((__nonnull__ (1, 2, 3)));
1903
1904
1905
1906
1907extern int pthread_condattr_init (pthread_condattr_t *__attr)
1908 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1909
1910
1911extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
1912 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1913
1914
1915extern int pthread_condattr_getpshared (__const pthread_condattr_t *
1916 __restrict __attr,
1917 int *__restrict __pshared)
1918 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1919
1920
1921extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
1922 int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1923
1924
1925
1926extern int pthread_condattr_getclock (__const pthread_condattr_t *
1927 __restrict __attr,
1928 __clockid_t *__restrict __clock_id)
1929 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1930
1931
1932extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
1933 __clockid_t __clock_id)
1934 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1935# 1028 "/usr/include/pthread.h" 3 4
1936extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
1937 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1938
1939
1940extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
1941 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1942
1943
1944extern int pthread_spin_lock (pthread_spinlock_t *__lock)
1945 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1946
1947
1948extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
1949 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1950
1951
1952extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
1953 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1954
1955
1956
1957
1958
1959
1960extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
1961 __const pthread_barrierattr_t *__restrict
1962 __attr, unsigned int __count)
1963 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1964
1965
1966extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
1967 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1968
1969
1970extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
1971 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1972
1973
1974
1975extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
1976 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1977
1978
1979extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
1980 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1981
1982
1983extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
1984 __restrict __attr,
1985 int *__restrict __pshared)
1986 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1987
1988
1989extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
1990 int __pshared)
1991 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1992# 1095 "/usr/include/pthread.h" 3 4
1993extern int pthread_key_create (pthread_key_t *__key,
1994 void (*__destr_function) (void *))
1995 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1996
1997
1998extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__));
1999
2000
2001extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__));
2002
2003
2004extern int pthread_setspecific (pthread_key_t __key,
2005 __const void *__pointer) __attribute__ ((__nothrow__)) ;
2006
2007
2008
2009
2010extern int pthread_getcpuclockid (pthread_t __thread_id,
2011 __clockid_t *__clock_id)
2012 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2013# 1129 "/usr/include/pthread.h" 3 4
2014extern int pthread_atfork (void (*__prepare) (void),
2015 void (*__parent) (void),
2016 void (*__child) (void)) __attribute__ ((__nothrow__));
2017# 1143 "/usr/include/pthread.h" 3 4
2018
2019# 3 "sync01.c" 2
2020
2021int num;
2022
2023pthread_mutex_t m;
2024pthread_cond_t empty, full;
2025
2026void * thread1(void * arg)
2027{
2028 pthread_mutex_lock(&m);
2029
2030 while (num > 0)
2031 pthread_cond_wait(&empty, &m);
2032
2033 num++;
2034
2035 pthread_mutex_unlock(&m);
2036 pthread_cond_signal(&full);
2037}
2038
2039
2040void * thread2(void * arg)
2041{
2042 pthread_mutex_lock(&m);
2043
2044 while (num == 0)
2045 pthread_cond_wait(&full, &m);
2046
2047 num--;
2048
2049 pthread_mutex_unlock(&m);
2050
2051 pthread_cond_signal(&empty);
2052}
2053
2054
2055int main()
2056{
2057 pthread_t t1, t2;
2058
2059 num = 1;
2060
2061 pthread_mutex_init(&m, 0);
2062 pthread_cond_init(&empty, 0);
2063 pthread_cond_init(&full, 0);
2064
2065 pthread_create(&t1, 0, thread1, 0);
2066 pthread_create(&t2, 0, thread2, 0);
2067
2068 pthread_join(t1, 0);
2069 pthread_join(t2, 0);
2070
2071 if (num!=1)
2072 {
2073 ERROR: __VERIFIER_error();
2074 ;
2075 }
2076
2077 return 0;
2078
2079}
Note: See TracBrowser for help on using the repository browser.