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