@@ -10,24 +10,32 @@ typedef signed int __int32_t;
1010typedef unsigned int __uint32_t ;
1111__extension__ typedef signed long long int __int64_t ;
1212__extension__ typedef unsigned long long int __uint64_t ;
13+ typedef __int8_t __int_least8_t ;
14+ typedef __uint8_t __uint_least8_t ;
15+ typedef __int16_t __int_least16_t ;
16+ typedef __uint16_t __uint_least16_t ;
17+ typedef __int32_t __int_least32_t ;
18+ typedef __uint32_t __uint_least32_t ;
19+ typedef __int64_t __int_least64_t ;
20+ typedef __uint64_t __uint_least64_t ;
1321__extension__ typedef long long int __quad_t ;
1422__extension__ typedef unsigned long long int __u_quad_t ;
1523__extension__ typedef long long int __intmax_t ;
1624__extension__ typedef unsigned long long int __uintmax_t ;
17- __extension__ typedef __u_quad_t __dev_t ;
25+ __extension__ typedef __uint64_t __dev_t ;
1826__extension__ typedef unsigned int __uid_t ;
1927__extension__ typedef unsigned int __gid_t ;
2028__extension__ typedef unsigned long int __ino_t ;
21- __extension__ typedef __u_quad_t __ino64_t ;
29+ __extension__ typedef __uint64_t __ino64_t ;
2230__extension__ typedef unsigned int __mode_t ;
2331__extension__ typedef unsigned int __nlink_t ;
2432__extension__ typedef long int __off_t ;
25- __extension__ typedef __quad_t __off64_t ;
33+ __extension__ typedef __int64_t __off64_t ;
2634__extension__ typedef int __pid_t ;
2735__extension__ typedef struct { int __val[2 ]; } __fsid_t ;
2836__extension__ typedef long int __clock_t ;
2937__extension__ typedef unsigned long int __rlim_t ;
30- __extension__ typedef __u_quad_t __rlim64_t ;
38+ __extension__ typedef __uint64_t __rlim64_t ;
3139__extension__ typedef unsigned int __id_t ;
3240__extension__ typedef long int __time_t ;
3341__extension__ typedef unsigned int __useconds_t ;
@@ -38,11 +46,11 @@ __extension__ typedef int __clockid_t;
3846__extension__ typedef void * __timer_t ;
3947__extension__ typedef long int __blksize_t ;
4048__extension__ typedef long int __blkcnt_t ;
41- __extension__ typedef __quad_t __blkcnt64_t ;
49+ __extension__ typedef __int64_t __blkcnt64_t ;
4250__extension__ typedef unsigned long int __fsblkcnt_t ;
43- __extension__ typedef __u_quad_t __fsblkcnt64_t ;
51+ __extension__ typedef __uint64_t __fsblkcnt64_t ;
4452__extension__ typedef unsigned long int __fsfilcnt_t ;
45- __extension__ typedef __u_quad_t __fsfilcnt64_t ;
53+ __extension__ typedef __uint64_t __fsfilcnt64_t ;
4654__extension__ typedef int __fsword_t ;
4755__extension__ typedef int __ssize_t ;
4856__extension__ typedef long int __syscall_slong_t ;
@@ -52,12 +60,18 @@ typedef char *__caddr_t;
5260__extension__ typedef int __intptr_t ;
5361__extension__ typedef unsigned int __socklen_t ;
5462typedef int __sig_atomic_t ;
55- static __inline unsigned int
56- __bswap_32 (unsigned int __bsx)
63+ __extension__ typedef __int64_t __time64_t ;
64+ static __inline __uint16_t
65+ __bswap_16 (__uint16_t __bsx)
66+ {
67+ return __builtin_bswap16 (__bsx);
68+ }
69+ static __inline __uint32_t
70+ __bswap_32 (__uint32_t __bsx)
5771{
5872 return __builtin_bswap32 (__bsx);
5973}
60- static __inline __uint64_t
74+ __extension__ static __inline __uint64_t
6175__bswap_64 (__uint64_t __bsx)
6276{
6377 return __builtin_bswap64 (__bsx);
@@ -670,10 +684,7 @@ extern int pthread_atfork (void (*__prepare) (void),
670684 void (*__child) (void )) __attribute__ ((__nothrow__ , __leaf__));
671685
672686
673- struct _IO_FILE ;
674- typedef struct _IO_FILE __FILE;
675- struct _IO_FILE ;
676- typedef struct _IO_FILE FILE;
687+ typedef __builtin_va_list __gnuc_va_list;
677688typedef struct
678689{
679690 int __count;
@@ -683,41 +694,36 @@ typedef struct
683694 char __wchb[4 ];
684695 } __value;
685696} __mbstate_t ;
686- typedef struct
697+ typedef struct _G_fpos_t
687698{
688699 __off_t __pos;
689700 __mbstate_t __state;
690- } _G_fpos_t ;
691- typedef struct
701+ } __fpos_t ;
702+ typedef struct _G_fpos64_t
692703{
693704 __off64_t __pos;
694705 __mbstate_t __state;
695- } _G_fpos64_t;
696- typedef __builtin_va_list __gnuc_va_list;
697- struct _IO_jump_t ; struct _IO_FILE ;
706+ } __fpos64_t ;
707+ struct _IO_FILE ;
708+ typedef struct _IO_FILE __FILE;
709+ struct _IO_FILE ;
710+ typedef struct _IO_FILE FILE;
711+ struct _IO_FILE ;
712+ struct _IO_marker ;
713+ struct _IO_codecvt ;
714+ struct _IO_wide_data ;
698715typedef void _IO_lock_t;
699- struct _IO_marker {
700- struct _IO_marker *_next;
701- struct _IO_FILE *_sbuf;
702- int _pos;
703- };
704- enum __codecvt_result
716+ struct _IO_FILE
705717{
706- __codecvt_ok,
707- __codecvt_partial,
708- __codecvt_error,
709- __codecvt_noconv
710- };
711- struct _IO_FILE {
712718 int _flags;
713- char * _IO_read_ptr;
714- char * _IO_read_end;
715- char * _IO_read_base;
716- char * _IO_write_base;
717- char * _IO_write_ptr;
718- char * _IO_write_end;
719- char * _IO_buf_base;
720- char * _IO_buf_end;
719+ char * _IO_read_ptr;
720+ char * _IO_read_end;
721+ char * _IO_read_base;
722+ char * _IO_write_base;
723+ char * _IO_write_ptr;
724+ char * _IO_write_end;
725+ char * _IO_buf_base;
726+ char * _IO_buf_end;
721727 char *_IO_save_base;
722728 char *_IO_backup_base;
723729 char *_IO_save_end;
@@ -731,51 +737,21 @@ struct _IO_FILE {
731737 char _shortbuf[1 ];
732738 _IO_lock_t *_lock;
733739 __off64_t _offset;
734- void *__pad1 ;
735- void *__pad2 ;
736- void *__pad3 ;
737- void *__pad4 ;
740+ struct _IO_codecvt *_codecvt ;
741+ struct _IO_wide_data *_wide_data ;
742+ struct _IO_FILE *_freeres_list ;
743+ void *_freeres_buf ;
738744 size_t __pad5;
739745 int _mode;
740746 char _unused2[15 * sizeof (int ) - 4 * sizeof (void *) - sizeof (size_t )];
741747};
742- typedef struct _IO_FILE _IO_FILE;
743- struct _IO_FILE_plus ;
744- extern struct _IO_FILE_plus _IO_2_1_stdin_;
745- extern struct _IO_FILE_plus _IO_2_1_stdout_;
746- extern struct _IO_FILE_plus _IO_2_1_stderr_;
747- typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
748- typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,
749- size_t __n);
750- typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
751- typedef int __io_close_fn (void *__cookie);
752- extern int __underflow (_IO_FILE *);
753- extern int __uflow (_IO_FILE *);
754- extern int __overflow (_IO_FILE *, int );
755- extern int _IO_getc (_IO_FILE *__fp);
756- extern int _IO_putc (int __c, _IO_FILE *__fp);
757- extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
758- extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
759- extern int _IO_peekc_locked (_IO_FILE *__fp);
760- extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
761- extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
762- extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
763- extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
764- __gnuc_va_list, int *__restrict);
765- extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
766- __gnuc_va_list);
767- extern __ssize_t _IO_padn (_IO_FILE *, int , __ssize_t );
768- extern size_t _IO_sgetn (_IO_FILE *, void *, size_t );
769- extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t , int , int );
770- extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t , int );
771- extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
772748typedef __gnuc_va_list va_list;
773749typedef __off_t off_t ;
774750typedef __ssize_t ssize_t ;
775- typedef _G_fpos_t fpos_t ;
776- extern struct _IO_FILE *stdin;
777- extern struct _IO_FILE *stdout;
778- extern struct _IO_FILE *stderr;
751+ typedef __fpos_t fpos_t ;
752+ extern FILE *stdin;
753+ extern FILE *stdout;
754+ extern FILE *stderr;
779755extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
780756extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
781757extern int renameat (int __oldfd, const char *__old, int __newfd,
@@ -863,14 +839,14 @@ extern int putw (int __w, FILE *__stream);
863839extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
864840 ;
865841extern __ssize_t __getdelim (char **__restrict __lineptr,
866- size_t *__restrict __n, int __delimiter,
867- FILE *__restrict __stream) ;
842+ size_t *__restrict __n, int __delimiter,
843+ FILE *__restrict __stream) ;
868844extern __ssize_t getdelim (char **__restrict __lineptr,
869- size_t *__restrict __n, int __delimiter,
870- FILE *__restrict __stream) ;
845+ size_t *__restrict __n, int __delimiter,
846+ FILE *__restrict __stream) ;
871847extern __ssize_t getline (char **__restrict __lineptr,
872- size_t *__restrict __n,
873- FILE *__restrict __stream) ;
848+ size_t *__restrict __n,
849+ FILE *__restrict __stream) ;
874850extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
875851extern int puts (const char *__s);
876852extern int ungetc (int __c, FILE *__stream);
@@ -906,6 +882,8 @@ extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
906882extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
907883extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
908884extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
885+ extern int __uflow (FILE *);
886+ extern int __overflow (FILE *, int );
909887
910888typedef long int wchar_t ;
911889
@@ -998,10 +976,10 @@ typedef __int8_t int8_t;
998976typedef __int16_t int16_t ;
999977typedef __int32_t int32_t ;
1000978typedef __int64_t int64_t ;
1001- typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))) ;
1002- typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))) ;
1003- typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))) ;
1004- typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))) ;
979+ typedef __uint8_t u_int8_t ;
980+ typedef __uint16_t u_int16_t ;
981+ typedef __uint32_t u_int32_t ;
982+ typedef __uint64_t u_int64_t ;
1005983typedef int register_t __attribute__ ((__mode__ (__word__)));
1006984typedef struct
1007985{
@@ -1031,11 +1009,6 @@ extern int pselect (int __nfds, fd_set *__restrict __readfds,
10311009 const struct timespec *__restrict __timeout,
10321010 const __sigset_t *__restrict __sigmask);
10331011
1034-
1035- extern unsigned int gnu_dev_major (__dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1036- extern unsigned int gnu_dev_minor (__dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1037- extern __dev_t gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1038-
10391012typedef __blksize_t blksize_t ;
10401013typedef __blkcnt_t blkcnt_t ;
10411014typedef __fsblkcnt_t fsblkcnt_t ;
@@ -1116,16 +1089,21 @@ extern int seed48_r (unsigned short int __seed16v[3],
11161089extern int lcong48_r (unsigned short int __param[7 ],
11171090 struct drand48_data *__buffer)
11181091 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1 , 2 )));
1119- extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
1092+ extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1093+ __attribute__ ((__alloc_size__ (1 ))) ;
11201094extern void *calloc (size_t __nmemb, size_t __size)
1121- __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
1095+ __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ ( 1 , 2 ))) ;
11221096extern void *realloc (void *__ptr, size_t __size)
1123- __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1097+ __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2 )));
1098+ extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
1099+ __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1100+ __attribute__ ((__alloc_size__ (2 , 3 )));
11241101extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
11251102
11261103extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
11271104
1128- extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
1105+ extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1106+ __attribute__ ((__alloc_size__ (1 ))) ;
11291107extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
11301108 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1 ))) ;
11311109extern void *aligned_alloc (size_t __alignment, size_t __size)
@@ -1675,6 +1653,8 @@ extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
16751653extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
16761654extern int lockf (int __fd, int __cmd, __off_t __len) ;
16771655extern int fdatasync (int __fildes);
1656+ extern char *crypt (const char *__key, const char *__salt)
1657+ __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1 , 2 )));
16781658int getentropy (void *__buffer, size_t __length) ;
16791659
16801660extern void abort (void );
@@ -1689,6 +1669,8 @@ extern void __assert (const char *__assertion, const char *__file, int __line)
16891669 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
16901670
16911671void reach_error () { ((void ) sizeof ((0 ) ? 1 : 0 ), __extension__ ({ if (0 ) ; else __assert_fail (" 0" , " race-2_2-container_of.c" , 14 , __extension__ __PRETTY_FUNCTION__); })); }
1672+ extern void __VERIFIER_atomic_begin (void );
1673+ extern void __VERIFIER_atomic_end (void );
16921674int __VERIFIER_nondet_int (void );
16931675void ldv_assert (int expression) { if (!expression) { ERROR: {reach_error ();abort ();}}; return ; }
16941676pthread_t t1,t2;
@@ -1707,8 +1689,12 @@ void *my_callback(void *arg) {
17071689 struct device *dev = (struct device *)arg;
17081690 struct my_data *data;
17091691 data = ({ const typeof ( ((struct my_data *)0 )->dev ) *__mptr = (dev); (struct my_data *)( (char *)__mptr - ((unsigned long ) &((struct my_data *)0 )->dev ) );});
1710- data->shared .a = 1 ;
1711- data->shared .b = data->shared .b + 1 ;
1692+ __VERIFIER_atomic_begin ();
1693+ data->shared .a = 1 ;
1694+ __VERIFIER_atomic_end ();
1695+ __VERIFIER_atomic_begin ();
1696+ data->shared .b = data->shared .b + 1 ;
1697+ __VERIFIER_atomic_end ();
17121698 return 0 ;
17131699}
17141700int my_drv_probe (struct my_data *data) {
0 commit comments