| [baa507b] | 1 | extern void __VERIFIER_error() __attribute__ ((__noreturn__));
|
|---|
| 2 | typedef unsigned char __u_char;
|
|---|
| 3 | typedef unsigned short int __u_short;
|
|---|
| 4 | typedef unsigned int __u_int;
|
|---|
| 5 | typedef unsigned long int __u_long;
|
|---|
| 6 | typedef signed char __int8_t;
|
|---|
| 7 | typedef unsigned char __uint8_t;
|
|---|
| 8 | typedef signed short int __int16_t;
|
|---|
| 9 | typedef unsigned short int __uint16_t;
|
|---|
| 10 | typedef signed int __int32_t;
|
|---|
| 11 | typedef unsigned int __uint32_t;
|
|---|
| 12 | typedef signed long int __int64_t;
|
|---|
| 13 | typedef unsigned long int __uint64_t;
|
|---|
| 14 | typedef long int __quad_t;
|
|---|
| 15 | typedef unsigned long int __u_quad_t;
|
|---|
| 16 | typedef unsigned long int __dev_t;
|
|---|
| 17 | typedef unsigned int __uid_t;
|
|---|
| 18 | typedef unsigned int __gid_t;
|
|---|
| 19 | typedef unsigned long int __ino_t;
|
|---|
| 20 | typedef unsigned long int __ino64_t;
|
|---|
| 21 | typedef unsigned int __mode_t;
|
|---|
| 22 | typedef unsigned long int __nlink_t;
|
|---|
| 23 | typedef long int __off_t;
|
|---|
| 24 | typedef long int __off64_t;
|
|---|
| 25 | typedef int __pid_t;
|
|---|
| 26 | typedef struct { int __val[2]; } __fsid_t;
|
|---|
| 27 | typedef long int __clock_t;
|
|---|
| 28 | typedef unsigned long int __rlim_t;
|
|---|
| 29 | typedef unsigned long int __rlim64_t;
|
|---|
| 30 | typedef unsigned int __id_t;
|
|---|
| 31 | typedef long int __time_t;
|
|---|
| 32 | typedef unsigned int __useconds_t;
|
|---|
| 33 | typedef long int __suseconds_t;
|
|---|
| 34 | typedef int __daddr_t;
|
|---|
| 35 | typedef long int __swblk_t;
|
|---|
| 36 | typedef int __key_t;
|
|---|
| 37 | typedef int __clockid_t;
|
|---|
| 38 | typedef void * __timer_t;
|
|---|
| 39 | typedef long int __blksize_t;
|
|---|
| 40 | typedef long int __blkcnt_t;
|
|---|
| 41 | typedef long int __blkcnt64_t;
|
|---|
| 42 | typedef unsigned long int __fsblkcnt_t;
|
|---|
| 43 | typedef unsigned long int __fsblkcnt64_t;
|
|---|
| 44 | typedef unsigned long int __fsfilcnt_t;
|
|---|
| 45 | typedef unsigned long int __fsfilcnt64_t;
|
|---|
| 46 | typedef long int __ssize_t;
|
|---|
| 47 | typedef __off64_t __loff_t;
|
|---|
| 48 | typedef __quad_t *__qaddr_t;
|
|---|
| 49 | typedef char *__caddr_t;
|
|---|
| 50 | typedef long int __intptr_t;
|
|---|
| 51 | typedef unsigned int __socklen_t;
|
|---|
| 52 | typedef long unsigned int size_t;
|
|---|
| 53 |
|
|---|
| 54 | typedef __time_t time_t;
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 | struct timespec
|
|---|
| 58 | {
|
|---|
| 59 | __time_t tv_sec;
|
|---|
| 60 | long int tv_nsec;
|
|---|
| 61 | };
|
|---|
| 62 | typedef __pid_t pid_t;
|
|---|
| 63 | struct sched_param
|
|---|
| 64 | {
|
|---|
| 65 | int __sched_priority;
|
|---|
| 66 | };
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 | struct __sched_param
|
|---|
| 70 | {
|
|---|
| 71 | int __sched_priority;
|
|---|
| 72 | };
|
|---|
| 73 | typedef unsigned long int __cpu_mask;
|
|---|
| 74 | typedef struct
|
|---|
| 75 | {
|
|---|
| 76 | __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
|
|---|
| 77 | } cpu_set_t;
|
|---|
| 78 |
|
|---|
| 79 | extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
|
|---|
| 80 | __attribute__ ((__nothrow__));
|
|---|
| 81 | extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__)) ;
|
|---|
| 82 | extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__));
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 | extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
|
|---|
| 86 | __attribute__ ((__nothrow__));
|
|---|
| 87 | extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__));
|
|---|
| 88 | extern int sched_setscheduler (__pid_t __pid, int __policy,
|
|---|
| 89 | __const struct sched_param *__param) __attribute__ ((__nothrow__));
|
|---|
| 90 | extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__));
|
|---|
| 91 | extern int sched_yield (void) __attribute__ ((__nothrow__));
|
|---|
| 92 | extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__));
|
|---|
| 93 | extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__));
|
|---|
| 94 | extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__));
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 | typedef __clock_t clock_t;
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 | typedef __clockid_t clockid_t;
|
|---|
| 102 | typedef __timer_t timer_t;
|
|---|
| 103 |
|
|---|
| 104 | struct tm
|
|---|
| 105 | {
|
|---|
| 106 | int tm_sec;
|
|---|
| 107 | int tm_min;
|
|---|
| 108 | int tm_hour;
|
|---|
| 109 | int tm_mday;
|
|---|
| 110 | int tm_mon;
|
|---|
| 111 | int tm_year;
|
|---|
| 112 | int tm_wday;
|
|---|
| 113 | int tm_yday;
|
|---|
| 114 | int tm_isdst;
|
|---|
| 115 | long int tm_gmtoff;
|
|---|
| 116 | __const char *tm_zone;
|
|---|
| 117 | };
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 | struct itimerspec
|
|---|
| 121 | {
|
|---|
| 122 | struct timespec it_interval;
|
|---|
| 123 | struct timespec it_value;
|
|---|
| 124 | };
|
|---|
| 125 | struct sigevent;
|
|---|
| 126 |
|
|---|
| 127 | extern clock_t clock (void) __attribute__ ((__nothrow__));
|
|---|
| 128 | extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
|
|---|
| 129 | extern double difftime (time_t __time1, time_t __time0)
|
|---|
| 130 | __attribute__ ((__nothrow__)) __attribute__ ((__const__));
|
|---|
| 131 | extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
|
|---|
| 132 | extern size_t strftime (char *__restrict __s, size_t __maxsize,
|
|---|
| 133 | __const char *__restrict __format,
|
|---|
| 134 | __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
|
|---|
| 135 |
|
|---|
| 136 | typedef struct __locale_struct
|
|---|
| 137 | {
|
|---|
| 138 | struct __locale_data *__locales[13];
|
|---|
| 139 | const unsigned short int *__ctype_b;
|
|---|
| 140 | const int *__ctype_tolower;
|
|---|
| 141 | const int *__ctype_toupper;
|
|---|
| 142 | const char *__names[13];
|
|---|
| 143 | } *__locale_t;
|
|---|
| 144 | typedef __locale_t locale_t;
|
|---|
| 145 | extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
|
|---|
| 146 | __const char *__restrict __format,
|
|---|
| 147 | __const struct tm *__restrict __tp,
|
|---|
| 148 | __locale_t __loc) __attribute__ ((__nothrow__));
|
|---|
| 149 |
|
|---|
| 150 | extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
|
|---|
| 151 | extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
|
|---|
| 152 |
|
|---|
| 153 | extern struct tm *gmtime_r (__const time_t *__restrict __timer,
|
|---|
| 154 | struct tm *__restrict __tp) __attribute__ ((__nothrow__));
|
|---|
| 155 | extern struct tm *localtime_r (__const time_t *__restrict __timer,
|
|---|
| 156 | struct tm *__restrict __tp) __attribute__ ((__nothrow__));
|
|---|
| 157 |
|
|---|
| 158 | extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
|
|---|
| 159 | extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
|
|---|
| 160 |
|
|---|
| 161 | extern char *asctime_r (__const struct tm *__restrict __tp,
|
|---|
| 162 | char *__restrict __buf) __attribute__ ((__nothrow__));
|
|---|
| 163 | extern char *ctime_r (__const time_t *__restrict __timer,
|
|---|
| 164 | char *__restrict __buf) __attribute__ ((__nothrow__));
|
|---|
| 165 | extern char *__tzname[2];
|
|---|
| 166 | extern int __daylight;
|
|---|
| 167 | extern long int __timezone;
|
|---|
| 168 | extern char *tzname[2];
|
|---|
| 169 | extern void tzset (void) __attribute__ ((__nothrow__));
|
|---|
| 170 | extern int daylight;
|
|---|
| 171 | extern long int timezone;
|
|---|
| 172 | extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
|
|---|
| 173 | extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
|
|---|
| 174 | extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
|
|---|
| 175 | extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
|
|---|
| 176 | extern int nanosleep (__const struct timespec *__requested_time,
|
|---|
| 177 | struct timespec *__remaining);
|
|---|
| 178 | extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
|
|---|
| 179 | extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
|
|---|
| 180 | extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
|
|---|
| 181 | __attribute__ ((__nothrow__));
|
|---|
| 182 | extern int clock_nanosleep (clockid_t __clock_id, int __flags,
|
|---|
| 183 | __const struct timespec *__req,
|
|---|
| 184 | struct timespec *__rem);
|
|---|
| 185 | extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__));
|
|---|
| 186 | extern int timer_create (clockid_t __clock_id,
|
|---|
| 187 | struct sigevent *__restrict __evp,
|
|---|
| 188 | timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
|
|---|
| 189 | extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
|
|---|
| 190 | extern int timer_settime (timer_t __timerid, int __flags,
|
|---|
| 191 | __const struct itimerspec *__restrict __value,
|
|---|
| 192 | struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
|
|---|
| 193 | extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
|
|---|
| 194 | __attribute__ ((__nothrow__));
|
|---|
| 195 | extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
|
|---|
| 196 |
|
|---|
| 197 | typedef unsigned long int pthread_t;
|
|---|
| 198 | typedef union
|
|---|
| 199 | {
|
|---|
| 200 | char __size[56];
|
|---|
| 201 | long int __align;
|
|---|
| 202 | } pthread_attr_t;
|
|---|
| 203 | typedef struct __pthread_internal_list
|
|---|
| 204 | {
|
|---|
| 205 | struct __pthread_internal_list *__prev;
|
|---|
| 206 | struct __pthread_internal_list *__next;
|
|---|
| 207 | } __pthread_list_t;
|
|---|
| 208 | typedef union
|
|---|
| 209 | {
|
|---|
| 210 | struct __pthread_mutex_s
|
|---|
| 211 | {
|
|---|
| 212 | int __lock;
|
|---|
| 213 | unsigned int __count;
|
|---|
| 214 | int __owner;
|
|---|
| 215 | unsigned int __nusers;
|
|---|
| 216 | int __kind;
|
|---|
| 217 | int __spins;
|
|---|
| 218 | __pthread_list_t __list;
|
|---|
| 219 | } __data;
|
|---|
| 220 | char __size[40];
|
|---|
| 221 | long int __align;
|
|---|
| 222 | } pthread_mutex_t;
|
|---|
| 223 | typedef union
|
|---|
| 224 | {
|
|---|
| 225 | char __size[4];
|
|---|
| 226 | int __align;
|
|---|
| 227 | } pthread_mutexattr_t;
|
|---|
| 228 | typedef union
|
|---|
| 229 | {
|
|---|
| 230 | struct
|
|---|
| 231 | {
|
|---|
| 232 | int __lock;
|
|---|
| 233 | unsigned int __futex;
|
|---|
| 234 | __extension__ unsigned long long int __total_seq;
|
|---|
| 235 | __extension__ unsigned long long int __wakeup_seq;
|
|---|
| 236 | __extension__ unsigned long long int __woken_seq;
|
|---|
| 237 | void *__mutex;
|
|---|
| 238 | unsigned int __nwaiters;
|
|---|
| 239 | unsigned int __broadcast_seq;
|
|---|
| 240 | } __data;
|
|---|
| 241 | char __size[48];
|
|---|
| 242 | __extension__ long long int __align;
|
|---|
| 243 | } pthread_cond_t;
|
|---|
| 244 | typedef union
|
|---|
| 245 | {
|
|---|
| 246 | char __size[4];
|
|---|
| 247 | int __align;
|
|---|
| 248 | } pthread_condattr_t;
|
|---|
| 249 | typedef unsigned int pthread_key_t;
|
|---|
| 250 | typedef int pthread_once_t;
|
|---|
| 251 | typedef union
|
|---|
| 252 | {
|
|---|
| 253 | struct
|
|---|
| 254 | {
|
|---|
| 255 | int __lock;
|
|---|
| 256 | unsigned int __nr_readers;
|
|---|
| 257 | unsigned int __readers_wakeup;
|
|---|
| 258 | unsigned int __writer_wakeup;
|
|---|
| 259 | unsigned int __nr_readers_queued;
|
|---|
| 260 | unsigned int __nr_writers_queued;
|
|---|
| 261 | int __writer;
|
|---|
| 262 | int __shared;
|
|---|
| 263 | unsigned long int __pad1;
|
|---|
| 264 | unsigned long int __pad2;
|
|---|
| 265 | unsigned int __flags;
|
|---|
| 266 | } __data;
|
|---|
| 267 | char __size[56];
|
|---|
| 268 | long int __align;
|
|---|
| 269 | } pthread_rwlock_t;
|
|---|
| 270 | typedef union
|
|---|
| 271 | {
|
|---|
| 272 | char __size[8];
|
|---|
| 273 | long int __align;
|
|---|
| 274 | } pthread_rwlockattr_t;
|
|---|
| 275 | typedef volatile int pthread_spinlock_t;
|
|---|
| 276 | typedef union
|
|---|
| 277 | {
|
|---|
| 278 | char __size[32];
|
|---|
| 279 | long int __align;
|
|---|
| 280 | } pthread_barrier_t;
|
|---|
| 281 | typedef union
|
|---|
| 282 | {
|
|---|
| 283 | char __size[4];
|
|---|
| 284 | int __align;
|
|---|
| 285 | } pthread_barrierattr_t;
|
|---|
| 286 | typedef long int __jmp_buf[8];
|
|---|
| 287 | enum
|
|---|
| 288 | {
|
|---|
| 289 | PTHREAD_CREATE_JOINABLE,
|
|---|
| 290 | PTHREAD_CREATE_DETACHED
|
|---|
| 291 | };
|
|---|
| 292 | enum
|
|---|
| 293 | {
|
|---|
| 294 | PTHREAD_MUTEX_TIMED_NP,
|
|---|
| 295 | PTHREAD_MUTEX_RECURSIVE_NP,
|
|---|
| 296 | PTHREAD_MUTEX_ERRORCHECK_NP,
|
|---|
| 297 | PTHREAD_MUTEX_ADAPTIVE_NP
|
|---|
| 298 | ,
|
|---|
| 299 | PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
|
|---|
| 300 | PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
|
|---|
| 301 | PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
|
|---|
| 302 | PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
|
|---|
| 303 | };
|
|---|
| 304 | enum
|
|---|
| 305 | {
|
|---|
| 306 | PTHREAD_MUTEX_STALLED,
|
|---|
| 307 | PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
|
|---|
| 308 | PTHREAD_MUTEX_ROBUST,
|
|---|
| 309 | PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
|
|---|
| 310 | };
|
|---|
| 311 | enum
|
|---|
| 312 | {
|
|---|
| 313 | PTHREAD_RWLOCK_PREFER_READER_NP,
|
|---|
| 314 | PTHREAD_RWLOCK_PREFER_WRITER_NP,
|
|---|
| 315 | PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
|
|---|
| 316 | PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
|
|---|
| 317 | };
|
|---|
| 318 | enum
|
|---|
| 319 | {
|
|---|
| 320 | PTHREAD_INHERIT_SCHED,
|
|---|
| 321 | PTHREAD_EXPLICIT_SCHED
|
|---|
| 322 | };
|
|---|
| 323 | enum
|
|---|
| 324 | {
|
|---|
| 325 | PTHREAD_SCOPE_SYSTEM,
|
|---|
| 326 | PTHREAD_SCOPE_PROCESS
|
|---|
| 327 | };
|
|---|
| 328 | enum
|
|---|
| 329 | {
|
|---|
| 330 | PTHREAD_PROCESS_PRIVATE,
|
|---|
| 331 | PTHREAD_PROCESS_SHARED
|
|---|
| 332 | };
|
|---|
| 333 | struct _pthread_cleanup_buffer
|
|---|
| 334 | {
|
|---|
| 335 | void (*__routine) (void *);
|
|---|
| 336 | void *__arg;
|
|---|
| 337 | int __canceltype;
|
|---|
| 338 | struct _pthread_cleanup_buffer *__prev;
|
|---|
| 339 | };
|
|---|
| 340 | enum
|
|---|
| 341 | {
|
|---|
| 342 | PTHREAD_CANCEL_ENABLE,
|
|---|
| 343 | PTHREAD_CANCEL_DISABLE
|
|---|
| 344 | };
|
|---|
| 345 | enum
|
|---|
| 346 | {
|
|---|
| 347 | PTHREAD_CANCEL_DEFERRED,
|
|---|
| 348 | PTHREAD_CANCEL_ASYNCHRONOUS
|
|---|
| 349 | };
|
|---|
| 350 |
|
|---|
| 351 | extern int pthread_create (pthread_t *__restrict __newthread,
|
|---|
| 352 | __const pthread_attr_t *__restrict __attr,
|
|---|
| 353 | void *(*__start_routine) (void *),
|
|---|
| 354 | void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
|
|---|
| 355 | extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
|
|---|
| 356 | extern int pthread_join (pthread_t __th, void **__thread_return);
|
|---|
| 357 | extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__));
|
|---|
| 358 | extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
|
|---|
| 359 | extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__));
|
|---|
| 360 | extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 361 | extern int pthread_attr_destroy (pthread_attr_t *__attr)
|
|---|
| 362 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 363 | extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
|
|---|
| 364 | int *__detachstate)
|
|---|
| 365 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 366 | extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
|
|---|
| 367 | int __detachstate)
|
|---|
| 368 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 369 | extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
|
|---|
| 370 | size_t *__guardsize)
|
|---|
| 371 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 372 | extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
|
|---|
| 373 | size_t __guardsize)
|
|---|
| 374 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 375 | extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
|
|---|
| 376 | __attr,
|
|---|
| 377 | struct sched_param *__restrict __param)
|
|---|
| 378 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 379 | extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
|
|---|
| 380 | __const struct sched_param *__restrict
|
|---|
| 381 | __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 382 | extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
|
|---|
| 383 | __attr, int *__restrict __policy)
|
|---|
| 384 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 385 | extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
|
|---|
| 386 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 387 | extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
|
|---|
| 388 | __attr, int *__restrict __inherit)
|
|---|
| 389 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 390 | extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
|
|---|
| 391 | int __inherit)
|
|---|
| 392 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 393 | extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
|
|---|
| 394 | int *__restrict __scope)
|
|---|
| 395 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 396 | extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
|
|---|
| 397 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 398 | extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
|
|---|
| 399 | __attr, void **__restrict __stackaddr)
|
|---|
| 400 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
|
|---|
| 401 | extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
|
|---|
| 402 | void *__stackaddr)
|
|---|
| 403 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
|
|---|
| 404 | extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
|
|---|
| 405 | __attr, size_t *__restrict __stacksize)
|
|---|
| 406 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 407 | extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
|
|---|
| 408 | size_t __stacksize)
|
|---|
| 409 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 410 | extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
|
|---|
| 411 | void **__restrict __stackaddr,
|
|---|
| 412 | size_t *__restrict __stacksize)
|
|---|
| 413 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
|
|---|
| 414 | extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
|
|---|
| 415 | size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 416 | extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
|
|---|
| 417 | __const struct sched_param *__param)
|
|---|
| 418 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
|
|---|
| 419 | extern int pthread_getschedparam (pthread_t __target_thread,
|
|---|
| 420 | int *__restrict __policy,
|
|---|
| 421 | struct sched_param *__restrict __param)
|
|---|
| 422 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
|
|---|
| 423 | extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
|
|---|
| 424 | __attribute__ ((__nothrow__));
|
|---|
| 425 | extern int pthread_once (pthread_once_t *__once_control,
|
|---|
| 426 | void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 427 | extern int pthread_setcancelstate (int __state, int *__oldstate);
|
|---|
| 428 | extern int pthread_setcanceltype (int __type, int *__oldtype);
|
|---|
| 429 | extern int pthread_cancel (pthread_t __th);
|
|---|
| 430 | extern void pthread_testcancel (void);
|
|---|
| 431 | typedef struct
|
|---|
| 432 | {
|
|---|
| 433 | struct
|
|---|
| 434 | {
|
|---|
| 435 | __jmp_buf __cancel_jmp_buf;
|
|---|
| 436 | int __mask_was_saved;
|
|---|
| 437 | } __cancel_jmp_buf[1];
|
|---|
| 438 | void *__pad[4];
|
|---|
| 439 | } __pthread_unwind_buf_t __attribute__ ((__aligned__));
|
|---|
| 440 | struct __pthread_cleanup_frame
|
|---|
| 441 | {
|
|---|
| 442 | void (*__cancel_routine) (void *);
|
|---|
| 443 | void *__cancel_arg;
|
|---|
| 444 | int __do_it;
|
|---|
| 445 | int __cancel_type;
|
|---|
| 446 | };
|
|---|
| 447 | extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
|
|---|
| 448 | ;
|
|---|
| 449 | extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
|
|---|
| 450 | ;
|
|---|
| 451 | extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
|
|---|
| 452 | __attribute__ ((__noreturn__))
|
|---|
| 453 | __attribute__ ((__weak__))
|
|---|
| 454 | ;
|
|---|
| 455 | struct __jmp_buf_tag;
|
|---|
| 456 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
|
|---|
| 457 | extern int pthread_mutex_init (pthread_mutex_t *__mutex,
|
|---|
| 458 | __const pthread_mutexattr_t *__mutexattr)
|
|---|
| 459 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 460 | extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
|
|---|
| 461 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 462 | extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
|
|---|
| 463 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 464 | extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
|
|---|
| 465 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 466 | extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
|
|---|
| 467 | __const struct timespec *__restrict
|
|---|
| 468 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 469 | extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
|
|---|
| 470 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 471 | extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
|
|---|
| 472 | __restrict __mutex,
|
|---|
| 473 | int *__restrict __prioceiling)
|
|---|
| 474 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 475 | extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
|
|---|
| 476 | int __prioceiling,
|
|---|
| 477 | int *__restrict __old_ceiling)
|
|---|
| 478 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
|
|---|
| 479 | extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
|
|---|
| 480 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 481 | extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
|
|---|
| 482 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 483 | extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
|
|---|
| 484 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 485 | extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
|
|---|
| 486 | __restrict __attr,
|
|---|
| 487 | int *__restrict __pshared)
|
|---|
| 488 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 489 | extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
|
|---|
| 490 | int __pshared)
|
|---|
| 491 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 492 | extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
|
|---|
| 493 | __attr, int *__restrict __kind)
|
|---|
| 494 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 495 | extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
|
|---|
| 496 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 497 | extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
|
|---|
| 498 | __restrict __attr,
|
|---|
| 499 | int *__restrict __protocol)
|
|---|
| 500 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 501 | extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
|
|---|
| 502 | int __protocol)
|
|---|
| 503 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 504 | extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
|
|---|
| 505 | __restrict __attr,
|
|---|
| 506 | int *__restrict __prioceiling)
|
|---|
| 507 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 508 | extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
|
|---|
| 509 | int __prioceiling)
|
|---|
| 510 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 511 | extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
|
|---|
| 512 | int *__robustness)
|
|---|
| 513 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 514 | extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
|
|---|
| 515 | int __robustness)
|
|---|
| 516 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 517 | extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
|
|---|
| 518 | __const pthread_rwlockattr_t *__restrict
|
|---|
| 519 | __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 520 | extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
|
|---|
| 521 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 522 | extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
|
|---|
| 523 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 524 | extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
|
|---|
| 525 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 526 | extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
|
|---|
| 527 | __const struct timespec *__restrict
|
|---|
| 528 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 529 | extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
|
|---|
| 530 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 531 | extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
|
|---|
| 532 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 533 | extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
|
|---|
| 534 | __const struct timespec *__restrict
|
|---|
| 535 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 536 | extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
|
|---|
| 537 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 538 | extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
|
|---|
| 539 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 540 | extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
|
|---|
| 541 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 542 | extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
|
|---|
| 543 | __restrict __attr,
|
|---|
| 544 | int *__restrict __pshared)
|
|---|
| 545 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 546 | extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
|
|---|
| 547 | int __pshared)
|
|---|
| 548 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 549 | extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
|
|---|
| 550 | __restrict __attr,
|
|---|
| 551 | int *__restrict __pref)
|
|---|
| 552 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 553 | extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
|
|---|
| 554 | int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 555 | extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
|
|---|
| 556 | __const pthread_condattr_t *__restrict
|
|---|
| 557 | __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 558 | extern int pthread_cond_destroy (pthread_cond_t *__cond)
|
|---|
| 559 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 560 | extern int pthread_cond_signal (pthread_cond_t *__cond)
|
|---|
| 561 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 562 | extern int pthread_cond_broadcast (pthread_cond_t *__cond)
|
|---|
| 563 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 564 | extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
|
|---|
| 565 | pthread_mutex_t *__restrict __mutex)
|
|---|
| 566 | __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 567 | extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
|
|---|
| 568 | pthread_mutex_t *__restrict __mutex,
|
|---|
| 569 | __const struct timespec *__restrict
|
|---|
| 570 | __abstime) __attribute__ ((__nonnull__ (1, 2, 3)));
|
|---|
| 571 | extern int pthread_condattr_init (pthread_condattr_t *__attr)
|
|---|
| 572 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 573 | extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
|
|---|
| 574 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 575 | extern int pthread_condattr_getpshared (__const pthread_condattr_t *
|
|---|
| 576 | __restrict __attr,
|
|---|
| 577 | int *__restrict __pshared)
|
|---|
| 578 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 579 | extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
|
|---|
| 580 | int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 581 | extern int pthread_condattr_getclock (__const pthread_condattr_t *
|
|---|
| 582 | __restrict __attr,
|
|---|
| 583 | __clockid_t *__restrict __clock_id)
|
|---|
| 584 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 585 | extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
|
|---|
| 586 | __clockid_t __clock_id)
|
|---|
| 587 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 588 | extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
|
|---|
| 589 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 590 | extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
|
|---|
| 591 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 592 | extern int pthread_spin_lock (pthread_spinlock_t *__lock)
|
|---|
| 593 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 594 | extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
|
|---|
| 595 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 596 | extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
|
|---|
| 597 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 598 | extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
|
|---|
| 599 | __const pthread_barrierattr_t *__restrict
|
|---|
| 600 | __attr, unsigned int __count)
|
|---|
| 601 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 602 | extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
|
|---|
| 603 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 604 | extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
|
|---|
| 605 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 606 | extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
|
|---|
| 607 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 608 | extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
|
|---|
| 609 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 610 | extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
|
|---|
| 611 | __restrict __attr,
|
|---|
| 612 | int *__restrict __pshared)
|
|---|
| 613 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 614 | extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
|
|---|
| 615 | int __pshared)
|
|---|
| 616 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 617 | extern int pthread_key_create (pthread_key_t *__key,
|
|---|
| 618 | void (*__destr_function) (void *))
|
|---|
| 619 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 620 | extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__));
|
|---|
| 621 | extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__));
|
|---|
| 622 | extern int pthread_setspecific (pthread_key_t __key,
|
|---|
| 623 | __const void *__pointer) __attribute__ ((__nothrow__)) ;
|
|---|
| 624 | extern int pthread_getcpuclockid (pthread_t __thread_id,
|
|---|
| 625 | __clockid_t *__clock_id)
|
|---|
| 626 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
|
|---|
| 627 | extern int pthread_atfork (void (*__prepare) (void),
|
|---|
| 628 | void (*__parent) (void),
|
|---|
| 629 | void (*__child) (void)) __attribute__ ((__nothrow__));
|
|---|
| 630 |
|
|---|
| 631 |
|
|---|
| 632 | struct _IO_FILE;
|
|---|
| 633 |
|
|---|
| 634 | typedef struct _IO_FILE FILE;
|
|---|
| 635 |
|
|---|
| 636 |
|
|---|
| 637 | typedef struct _IO_FILE __FILE;
|
|---|
| 638 | typedef struct
|
|---|
| 639 | {
|
|---|
| 640 | int __count;
|
|---|
| 641 | union
|
|---|
| 642 | {
|
|---|
| 643 | unsigned int __wch;
|
|---|
| 644 | char __wchb[4];
|
|---|
| 645 | } __value;
|
|---|
| 646 | } __mbstate_t;
|
|---|
| 647 | typedef struct
|
|---|
| 648 | {
|
|---|
| 649 | __off_t __pos;
|
|---|
| 650 | __mbstate_t __state;
|
|---|
| 651 | } _G_fpos_t;
|
|---|
| 652 | typedef struct
|
|---|
| 653 | {
|
|---|
| 654 | __off64_t __pos;
|
|---|
| 655 | __mbstate_t __state;
|
|---|
| 656 | } _G_fpos64_t;
|
|---|
| 657 | typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
|
|---|
| 658 | typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
|
|---|
| 659 | typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
|
|---|
| 660 | typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
|
|---|
| 661 | typedef __builtin_va_list __gnuc_va_list;
|
|---|
| 662 | struct _IO_jump_t; struct _IO_FILE;
|
|---|
| 663 | typedef void _IO_lock_t;
|
|---|
| 664 | struct _IO_marker {
|
|---|
| 665 | struct _IO_marker *_next;
|
|---|
| 666 | struct _IO_FILE *_sbuf;
|
|---|
| 667 | int _pos;
|
|---|
| 668 | };
|
|---|
| 669 | enum __codecvt_result
|
|---|
| 670 | {
|
|---|
| 671 | __codecvt_ok,
|
|---|
| 672 | __codecvt_partial,
|
|---|
| 673 | __codecvt_error,
|
|---|
| 674 | __codecvt_noconv
|
|---|
| 675 | };
|
|---|
| 676 | struct _IO_FILE {
|
|---|
| 677 | int _flags;
|
|---|
| 678 | char* _IO_read_ptr;
|
|---|
| 679 | char* _IO_read_end;
|
|---|
| 680 | char* _IO_read_base;
|
|---|
| 681 | char* _IO_write_base;
|
|---|
| 682 | char* _IO_write_ptr;
|
|---|
| 683 | char* _IO_write_end;
|
|---|
| 684 | char* _IO_buf_base;
|
|---|
| 685 | char* _IO_buf_end;
|
|---|
| 686 | char *_IO_save_base;
|
|---|
| 687 | char *_IO_backup_base;
|
|---|
| 688 | char *_IO_save_end;
|
|---|
| 689 | struct _IO_marker *_markers;
|
|---|
| 690 | struct _IO_FILE *_chain;
|
|---|
| 691 | int _fileno;
|
|---|
| 692 | int _flags2;
|
|---|
| 693 | __off_t _old_offset;
|
|---|
| 694 | unsigned short _cur_column;
|
|---|
| 695 | signed char _vtable_offset;
|
|---|
| 696 | char _shortbuf[1];
|
|---|
| 697 | _IO_lock_t *_lock;
|
|---|
| 698 | __off64_t _offset;
|
|---|
| 699 | void *__pad1;
|
|---|
| 700 | void *__pad2;
|
|---|
| 701 | void *__pad3;
|
|---|
| 702 | void *__pad4;
|
|---|
| 703 | size_t __pad5;
|
|---|
| 704 | int _mode;
|
|---|
| 705 | char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
|
|---|
| 706 | };
|
|---|
| 707 | typedef struct _IO_FILE _IO_FILE;
|
|---|
| 708 | struct _IO_FILE_plus;
|
|---|
| 709 | extern struct _IO_FILE_plus _IO_2_1_stdin_;
|
|---|
| 710 | extern struct _IO_FILE_plus _IO_2_1_stdout_;
|
|---|
| 711 | extern struct _IO_FILE_plus _IO_2_1_stderr_;
|
|---|
| 712 | typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
|
|---|
| 713 | typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
|
|---|
| 714 | size_t __n);
|
|---|
| 715 | typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
|
|---|
| 716 | typedef int __io_close_fn (void *__cookie);
|
|---|
| 717 | extern int __underflow (_IO_FILE *);
|
|---|
| 718 | extern int __uflow (_IO_FILE *);
|
|---|
| 719 | extern int __overflow (_IO_FILE *, int);
|
|---|
| 720 | extern int _IO_getc (_IO_FILE *__fp);
|
|---|
| 721 | extern int _IO_putc (int __c, _IO_FILE *__fp);
|
|---|
| 722 | extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
|
|---|
| 723 | extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
|
|---|
| 724 | extern int _IO_peekc_locked (_IO_FILE *__fp);
|
|---|
| 725 | extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
|
|---|
| 726 | extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
|
|---|
| 727 | extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
|
|---|
| 728 | extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
|
|---|
| 729 | __gnuc_va_list, int *__restrict);
|
|---|
| 730 | extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
|
|---|
| 731 | __gnuc_va_list);
|
|---|
| 732 | extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
|
|---|
| 733 | extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
|
|---|
| 734 | extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
|
|---|
| 735 | extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
|
|---|
| 736 | extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
|
|---|
| 737 | typedef __gnuc_va_list va_list;
|
|---|
| 738 | typedef __off_t off_t;
|
|---|
| 739 | typedef __ssize_t ssize_t;
|
|---|
| 740 |
|
|---|
| 741 | typedef _G_fpos_t fpos_t;
|
|---|
| 742 |
|
|---|
| 743 | extern struct _IO_FILE *stdin;
|
|---|
| 744 | extern struct _IO_FILE *stdout;
|
|---|
| 745 | extern struct _IO_FILE *stderr;
|
|---|
| 746 |
|
|---|
| 747 | extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
|
|---|
| 748 | extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
|
|---|
| 749 |
|
|---|
| 750 | extern int renameat (int __oldfd, __const char *__old, int __newfd,
|
|---|
| 751 | __const char *__new) __attribute__ ((__nothrow__));
|
|---|
| 752 |
|
|---|
| 753 | extern FILE *tmpfile (void) ;
|
|---|
| 754 | extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ;
|
|---|
| 755 |
|
|---|
| 756 | extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ;
|
|---|
| 757 | extern char *tempnam (__const char *__dir, __const char *__pfx)
|
|---|
| 758 | __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
|
|---|
| 759 |
|
|---|
| 760 | extern int fclose (FILE *__stream);
|
|---|
| 761 | extern int fflush (FILE *__stream);
|
|---|
| 762 |
|
|---|
| 763 | extern int fflush_unlocked (FILE *__stream);
|
|---|
| 764 |
|
|---|
| 765 | extern FILE *fopen (__const char *__restrict __filename,
|
|---|
| 766 | __const char *__restrict __modes) ;
|
|---|
| 767 | extern FILE *freopen (__const char *__restrict __filename,
|
|---|
| 768 | __const char *__restrict __modes,
|
|---|
| 769 | FILE *__restrict __stream) ;
|
|---|
| 770 |
|
|---|
| 771 | extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ;
|
|---|
| 772 | extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
|
|---|
| 773 | __attribute__ ((__nothrow__)) ;
|
|---|
| 774 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ;
|
|---|
| 775 |
|
|---|
| 776 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
|
|---|
| 777 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
|
|---|
| 778 | int __modes, size_t __n) __attribute__ ((__nothrow__));
|
|---|
| 779 |
|
|---|
| 780 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
|
|---|
| 781 | size_t __size) __attribute__ ((__nothrow__));
|
|---|
| 782 | extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
|
|---|
| 783 |
|
|---|
| 784 | extern int fprintf (FILE *__restrict __stream,
|
|---|
| 785 | __const char *__restrict __format, ...);
|
|---|
| 786 | extern int printf (__const char *__restrict __format, ...);
|
|---|
| 787 | extern int sprintf (char *__restrict __s,
|
|---|
| 788 | __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
|
|---|
| 789 | extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
|
|---|
| 790 | __gnuc_va_list __arg);
|
|---|
| 791 | extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
|
|---|
| 792 | extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
|
|---|
| 793 | __gnuc_va_list __arg) __attribute__ ((__nothrow__));
|
|---|
| 794 |
|
|---|
| 795 |
|
|---|
| 796 | extern int snprintf (char *__restrict __s, size_t __maxlen,
|
|---|
| 797 | __const char *__restrict __format, ...)
|
|---|
| 798 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
|
|---|
| 799 | extern int vsnprintf (char *__restrict __s, size_t __maxlen,
|
|---|
| 800 | __const char *__restrict __format, __gnuc_va_list __arg)
|
|---|
| 801 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
|
|---|
| 802 |
|
|---|
| 803 | extern int vdprintf (int __fd, __const char *__restrict __fmt,
|
|---|
| 804 | __gnuc_va_list __arg)
|
|---|
| 805 | __attribute__ ((__format__ (__printf__, 2, 0)));
|
|---|
| 806 | extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
|
|---|
| 807 | __attribute__ ((__format__ (__printf__, 2, 3)));
|
|---|
| 808 |
|
|---|
| 809 | extern int fscanf (FILE *__restrict __stream,
|
|---|
| 810 | __const char *__restrict __format, ...) ;
|
|---|
| 811 | extern int scanf (__const char *__restrict __format, ...) ;
|
|---|
| 812 | extern int sscanf (__const char *__restrict __s,
|
|---|
| 813 | __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
|
|---|
| 814 | extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") ;
|
|---|
| 815 | extern int scanf (__const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") ;
|
|---|
| 816 | extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__));
|
|---|
| 817 |
|
|---|
| 818 |
|
|---|
| 819 | extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
|
|---|
| 820 | __gnuc_va_list __arg)
|
|---|
| 821 | __attribute__ ((__format__ (__scanf__, 2, 0))) ;
|
|---|
| 822 | extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
|
|---|
| 823 | __attribute__ ((__format__ (__scanf__, 1, 0))) ;
|
|---|
| 824 | extern int vsscanf (__const char *__restrict __s,
|
|---|
| 825 | __const char *__restrict __format, __gnuc_va_list __arg)
|
|---|
| 826 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
|
|---|
| 827 | extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
|
|---|
| 828 | __attribute__ ((__format__ (__scanf__, 2, 0))) ;
|
|---|
| 829 | extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
|
|---|
| 830 | __attribute__ ((__format__ (__scanf__, 1, 0))) ;
|
|---|
| 831 | extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__))
|
|---|
| 832 | __attribute__ ((__format__ (__scanf__, 2, 0)));
|
|---|
| 833 |
|
|---|
| 834 |
|
|---|
| 835 | extern int fgetc (FILE *__stream);
|
|---|
| 836 | extern int getc (FILE *__stream);
|
|---|
| 837 | extern int getchar (void);
|
|---|
| 838 |
|
|---|
| 839 | extern int getc_unlocked (FILE *__stream);
|
|---|
| 840 | extern int getchar_unlocked (void);
|
|---|
| 841 | extern int fgetc_unlocked (FILE *__stream);
|
|---|
| 842 |
|
|---|
| 843 | extern int fputc (int __c, FILE *__stream);
|
|---|
| 844 | extern int putc (int __c, FILE *__stream);
|
|---|
| 845 | extern int putchar (int __c);
|
|---|
| 846 |
|
|---|
| 847 | extern int fputc_unlocked (int __c, FILE *__stream);
|
|---|
| 848 | extern int putc_unlocked (int __c, FILE *__stream);
|
|---|
| 849 | extern int putchar_unlocked (int __c);
|
|---|
| 850 | extern int getw (FILE *__stream);
|
|---|
| 851 | extern int putw (int __w, FILE *__stream);
|
|---|
| 852 |
|
|---|
| 853 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
|
|---|
| 854 | ;
|
|---|
| 855 | extern char *gets (char *__s) ;
|
|---|
| 856 |
|
|---|
| 857 | extern __ssize_t __getdelim (char **__restrict __lineptr,
|
|---|
| 858 | size_t *__restrict __n, int __delimiter,
|
|---|
| 859 | FILE *__restrict __stream) ;
|
|---|
| 860 | extern __ssize_t getdelim (char **__restrict __lineptr,
|
|---|
| 861 | size_t *__restrict __n, int __delimiter,
|
|---|
| 862 | FILE *__restrict __stream) ;
|
|---|
| 863 | extern __ssize_t getline (char **__restrict __lineptr,
|
|---|
| 864 | size_t *__restrict __n,
|
|---|
| 865 | FILE *__restrict __stream) ;
|
|---|
| 866 |
|
|---|
| 867 | extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
|
|---|
| 868 | extern int puts (__const char *__s);
|
|---|
| 869 | extern int ungetc (int __c, FILE *__stream);
|
|---|
| 870 | extern size_t fread (void *__restrict __ptr, size_t __size,
|
|---|
| 871 | size_t __n, FILE *__restrict __stream) ;
|
|---|
| 872 | extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
|
|---|
| 873 | size_t __n, FILE *__restrict __s) ;
|
|---|
| 874 |
|
|---|
| 875 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
|
|---|
| 876 | size_t __n, FILE *__restrict __stream) ;
|
|---|
| 877 | extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
|
|---|
| 878 | size_t __n, FILE *__restrict __stream) ;
|
|---|
| 879 |
|
|---|
| 880 | extern int fseek (FILE *__stream, long int __off, int __whence);
|
|---|
| 881 | extern long int ftell (FILE *__stream) ;
|
|---|
| 882 | extern void rewind (FILE *__stream);
|
|---|
| 883 |
|
|---|
| 884 | extern int fseeko (FILE *__stream, __off_t __off, int __whence);
|
|---|
| 885 | extern __off_t ftello (FILE *__stream) ;
|
|---|
| 886 |
|
|---|
| 887 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
|
|---|
| 888 | extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
|
|---|
| 889 |
|
|---|
| 890 |
|
|---|
| 891 | extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
|
|---|
| 892 | extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;
|
|---|
| 893 | extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;
|
|---|
| 894 |
|
|---|
| 895 | extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
|
|---|
| 896 | extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
|
|---|
| 897 | extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
|
|---|
| 898 |
|
|---|
| 899 | extern void perror (__const char *__s);
|
|---|
| 900 |
|
|---|
| 901 | extern int sys_nerr;
|
|---|
| 902 | extern __const char *__const sys_errlist[];
|
|---|
| 903 | extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;
|
|---|
| 904 | extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
|
|---|
| 905 | extern FILE *popen (__const char *__command, __const char *__modes) ;
|
|---|
| 906 | extern int pclose (FILE *__stream);
|
|---|
| 907 | extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
|
|---|
| 908 | extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
|
|---|
| 909 | extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;
|
|---|
| 910 | extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
|
|---|
| 911 |
|
|---|
| 912 | unsigned int __VERIFIER_nondet_uint();
|
|---|
| 913 | int top=0;
|
|---|
| 914 | unsigned int arr[(800)];
|
|---|
| 915 | pthread_mutex_t m;
|
|---|
| 916 | _Bool flag=(0);
|
|---|
| 917 | void error(void)
|
|---|
| 918 | {
|
|---|
| 919 | ERROR: __VERIFIER_error(); return;
|
|---|
| 920 | }
|
|---|
| 921 | void inc_top(void)
|
|---|
| 922 | {
|
|---|
| 923 | top++;
|
|---|
| 924 | }
|
|---|
| 925 | void dec_top(void)
|
|---|
| 926 | {
|
|---|
| 927 | top--;
|
|---|
| 928 | }
|
|---|
| 929 | int get_top(void)
|
|---|
| 930 | {
|
|---|
| 931 | return top;
|
|---|
| 932 | }
|
|---|
| 933 | int stack_empty(void)
|
|---|
| 934 | {
|
|---|
| 935 | (top==0) ? (1) : (0);
|
|---|
| 936 | }
|
|---|
| 937 | int push(unsigned int *stack, int x)
|
|---|
| 938 | {
|
|---|
| 939 | if (top==(800))
|
|---|
| 940 | {
|
|---|
| 941 | printf("stack overflow\n");
|
|---|
| 942 | return (-1);
|
|---|
| 943 | }
|
|---|
| 944 | else
|
|---|
| 945 | {
|
|---|
| 946 | stack[get_top()] = x;
|
|---|
| 947 | inc_top();
|
|---|
| 948 | }
|
|---|
| 949 | return 0;
|
|---|
| 950 | }
|
|---|
| 951 | int pop(unsigned int *stack)
|
|---|
| 952 | {
|
|---|
| 953 | if (top==0)
|
|---|
| 954 | {
|
|---|
| 955 | printf("stack underflow\n");
|
|---|
| 956 | return (-2);
|
|---|
| 957 | }
|
|---|
| 958 | else
|
|---|
| 959 | {
|
|---|
| 960 | dec_top();
|
|---|
| 961 | return stack[get_top()];
|
|---|
| 962 | }
|
|---|
| 963 | return 0;
|
|---|
| 964 | }
|
|---|
| 965 | void *t1(void *arg)
|
|---|
| 966 | {
|
|---|
| 967 | int i;
|
|---|
| 968 | unsigned int tmp;
|
|---|
| 969 | for(i=0; i<(800); i++)
|
|---|
| 970 | {
|
|---|
| 971 | pthread_mutex_lock(&m);
|
|---|
| 972 | tmp = __VERIFIER_nondet_uint()%(800);
|
|---|
| 973 | if ((push(arr,tmp)==(-1)))
|
|---|
| 974 | error();
|
|---|
| 975 | pthread_mutex_unlock(&m);
|
|---|
| 976 | }
|
|---|
| 977 | }
|
|---|
| 978 | void *t2(void *arg)
|
|---|
| 979 | {
|
|---|
| 980 | int i;
|
|---|
| 981 | for(i=0; i<(800); i++)
|
|---|
| 982 | {
|
|---|
| 983 | pthread_mutex_lock(&m);
|
|---|
| 984 | if (top>0)
|
|---|
| 985 | {
|
|---|
| 986 | if ((pop(arr)==(-2)))
|
|---|
| 987 | error();
|
|---|
| 988 | }
|
|---|
| 989 | pthread_mutex_unlock(&m);
|
|---|
| 990 | }
|
|---|
| 991 | }
|
|---|
| 992 | int main(void)
|
|---|
| 993 | {
|
|---|
| 994 | pthread_t id1, id2;
|
|---|
| 995 | pthread_mutex_init(&m, 0);
|
|---|
| 996 | pthread_create(&id1, ((void *)0), t1, ((void *)0));
|
|---|
| 997 | pthread_create(&id2, ((void *)0), t2, ((void *)0));
|
|---|
| 998 | pthread_join(id1, ((void *)0));
|
|---|
| 999 | pthread_join(id2, ((void *)0));
|
|---|
| 1000 | return 0;
|
|---|
| 1001 | }
|
|---|