| 1 | extern void __VERIFIER_error() __attribute__ ((__noreturn__));
|
|---|
| 2 | extern void __VERIFIER_atomic_begin(void);
|
|---|
| 3 | extern void __VERIFIER_atomic_end(void);
|
|---|
| 4 |
|
|---|
| 5 | typedef unsigned int size_t;
|
|---|
| 6 | typedef unsigned char __u_char;
|
|---|
| 7 | typedef unsigned short int __u_short;
|
|---|
| 8 | typedef unsigned int __u_int;
|
|---|
| 9 | typedef unsigned long int __u_long;
|
|---|
| 10 | typedef signed char __int8_t;
|
|---|
| 11 | typedef unsigned char __uint8_t;
|
|---|
| 12 | typedef signed short int __int16_t;
|
|---|
| 13 | typedef unsigned short int __uint16_t;
|
|---|
| 14 | typedef signed int __int32_t;
|
|---|
| 15 | typedef unsigned int __uint32_t;
|
|---|
| 16 | __extension__ typedef signed long long int __int64_t;
|
|---|
| 17 | __extension__ typedef unsigned long long int __uint64_t;
|
|---|
| 18 | __extension__ typedef long long int __quad_t;
|
|---|
| 19 | __extension__ typedef unsigned long long int __u_quad_t;
|
|---|
| 20 | __extension__ typedef __u_quad_t __dev_t;
|
|---|
| 21 | __extension__ typedef unsigned int __uid_t;
|
|---|
| 22 | __extension__ typedef unsigned int __gid_t;
|
|---|
| 23 | __extension__ typedef unsigned long int __ino_t;
|
|---|
| 24 | __extension__ typedef __u_quad_t __ino64_t;
|
|---|
| 25 | __extension__ typedef unsigned int __mode_t;
|
|---|
| 26 | __extension__ typedef unsigned int __nlink_t;
|
|---|
| 27 | __extension__ typedef long int __off_t;
|
|---|
| 28 | __extension__ typedef __quad_t __off64_t;
|
|---|
| 29 | __extension__ typedef int __pid_t;
|
|---|
| 30 | __extension__ typedef struct { int __val[2]; } __fsid_t;
|
|---|
| 31 | __extension__ typedef long int __clock_t;
|
|---|
| 32 | __extension__ typedef unsigned long int __rlim_t;
|
|---|
| 33 | __extension__ typedef __u_quad_t __rlim64_t;
|
|---|
| 34 | __extension__ typedef unsigned int __id_t;
|
|---|
| 35 | __extension__ typedef long int __time_t;
|
|---|
| 36 | __extension__ typedef unsigned int __useconds_t;
|
|---|
| 37 | __extension__ typedef long int __suseconds_t;
|
|---|
| 38 | __extension__ typedef int __daddr_t;
|
|---|
| 39 | __extension__ typedef int __key_t;
|
|---|
| 40 | __extension__ typedef int __clockid_t;
|
|---|
| 41 | __extension__ typedef void * __timer_t;
|
|---|
| 42 | __extension__ typedef long int __blksize_t;
|
|---|
| 43 | __extension__ typedef long int __blkcnt_t;
|
|---|
| 44 | __extension__ typedef __quad_t __blkcnt64_t;
|
|---|
| 45 | __extension__ typedef unsigned long int __fsblkcnt_t;
|
|---|
| 46 | __extension__ typedef __u_quad_t __fsblkcnt64_t;
|
|---|
| 47 | __extension__ typedef unsigned long int __fsfilcnt_t;
|
|---|
| 48 | __extension__ typedef __u_quad_t __fsfilcnt64_t;
|
|---|
| 49 | __extension__ typedef int __fsword_t;
|
|---|
| 50 | __extension__ typedef int __ssize_t;
|
|---|
| 51 | __extension__ typedef long int __syscall_slong_t;
|
|---|
| 52 | __extension__ typedef unsigned long int __syscall_ulong_t;
|
|---|
| 53 | typedef __off64_t __loff_t;
|
|---|
| 54 | typedef __quad_t *__qaddr_t;
|
|---|
| 55 | typedef char *__caddr_t;
|
|---|
| 56 | __extension__ typedef int __intptr_t;
|
|---|
| 57 | __extension__ typedef unsigned int __socklen_t;
|
|---|
| 58 | struct _IO_FILE;
|
|---|
| 59 |
|
|---|
| 60 | typedef struct _IO_FILE FILE;
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 | typedef struct _IO_FILE __FILE;
|
|---|
| 64 | typedef struct
|
|---|
| 65 | {
|
|---|
| 66 | int __count;
|
|---|
| 67 | union
|
|---|
| 68 | {
|
|---|
| 69 | unsigned int __wch;
|
|---|
| 70 | char __wchb[4];
|
|---|
| 71 | } __value;
|
|---|
| 72 | } __mbstate_t;
|
|---|
| 73 | typedef struct
|
|---|
| 74 | {
|
|---|
| 75 | __off_t __pos;
|
|---|
| 76 | __mbstate_t __state;
|
|---|
| 77 | } _G_fpos_t;
|
|---|
| 78 | typedef struct
|
|---|
| 79 | {
|
|---|
| 80 | __off64_t __pos;
|
|---|
| 81 | __mbstate_t __state;
|
|---|
| 82 | } _G_fpos64_t;
|
|---|
| 83 | typedef __builtin_va_list __gnuc_va_list;
|
|---|
| 84 | struct _IO_jump_t; struct _IO_FILE;
|
|---|
| 85 | typedef void _IO_lock_t;
|
|---|
| 86 | struct _IO_marker {
|
|---|
| 87 | struct _IO_marker *_next;
|
|---|
| 88 | struct _IO_FILE *_sbuf;
|
|---|
| 89 | int _pos;
|
|---|
| 90 | };
|
|---|
| 91 | enum __codecvt_result
|
|---|
| 92 | {
|
|---|
| 93 | __codecvt_ok,
|
|---|
| 94 | __codecvt_partial,
|
|---|
| 95 | __codecvt_error,
|
|---|
| 96 | __codecvt_noconv
|
|---|
| 97 | };
|
|---|
| 98 | struct _IO_FILE {
|
|---|
| 99 | int _flags;
|
|---|
| 100 | char* _IO_read_ptr;
|
|---|
| 101 | char* _IO_read_end;
|
|---|
| 102 | char* _IO_read_base;
|
|---|
| 103 | char* _IO_write_base;
|
|---|
| 104 | char* _IO_write_ptr;
|
|---|
| 105 | char* _IO_write_end;
|
|---|
| 106 | char* _IO_buf_base;
|
|---|
| 107 | char* _IO_buf_end;
|
|---|
| 108 | char *_IO_save_base;
|
|---|
| 109 | char *_IO_backup_base;
|
|---|
| 110 | char *_IO_save_end;
|
|---|
| 111 | struct _IO_marker *_markers;
|
|---|
| 112 | struct _IO_FILE *_chain;
|
|---|
| 113 | int _fileno;
|
|---|
| 114 | int _flags2;
|
|---|
| 115 | __off_t _old_offset;
|
|---|
| 116 | unsigned short _cur_column;
|
|---|
| 117 | signed char _vtable_offset;
|
|---|
| 118 | char _shortbuf[1];
|
|---|
| 119 | _IO_lock_t *_lock;
|
|---|
| 120 | __off64_t _offset;
|
|---|
| 121 | void *__pad1;
|
|---|
| 122 | void *__pad2;
|
|---|
| 123 | void *__pad3;
|
|---|
| 124 | void *__pad4;
|
|---|
| 125 | size_t __pad5;
|
|---|
| 126 | int _mode;
|
|---|
| 127 | char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
|
|---|
| 128 | };
|
|---|
| 129 | typedef struct _IO_FILE _IO_FILE;
|
|---|
| 130 | struct _IO_FILE_plus;
|
|---|
| 131 | extern struct _IO_FILE_plus _IO_2_1_stdin_;
|
|---|
| 132 | extern struct _IO_FILE_plus _IO_2_1_stdout_;
|
|---|
| 133 | extern struct _IO_FILE_plus _IO_2_1_stderr_;
|
|---|
| 134 | typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
|
|---|
| 135 | typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,
|
|---|
| 136 | size_t __n);
|
|---|
| 137 | typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
|
|---|
| 138 | typedef int __io_close_fn (void *__cookie);
|
|---|
| 139 | extern int __underflow (_IO_FILE *);
|
|---|
| 140 | extern int __uflow (_IO_FILE *);
|
|---|
| 141 | extern int __overflow (_IO_FILE *, int);
|
|---|
| 142 | extern int _IO_getc (_IO_FILE *__fp);
|
|---|
| 143 | extern int _IO_putc (int __c, _IO_FILE *__fp);
|
|---|
| 144 | extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 145 | extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 146 | extern int _IO_peekc_locked (_IO_FILE *__fp);
|
|---|
| 147 | extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 148 | extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 149 | extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 150 | extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
|
|---|
| 151 | __gnuc_va_list, int *__restrict);
|
|---|
| 152 | extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
|
|---|
| 153 | __gnuc_va_list);
|
|---|
| 154 | extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
|
|---|
| 155 | extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
|
|---|
| 156 | extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
|
|---|
| 157 | extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
|
|---|
| 158 | extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 159 | typedef __gnuc_va_list va_list;
|
|---|
| 160 | typedef __off_t off_t;
|
|---|
| 161 | typedef __ssize_t ssize_t;
|
|---|
| 162 |
|
|---|
| 163 | typedef _G_fpos_t fpos_t;
|
|---|
| 164 |
|
|---|
| 165 | extern struct _IO_FILE *stdin;
|
|---|
| 166 | extern struct _IO_FILE *stdout;
|
|---|
| 167 | extern struct _IO_FILE *stderr;
|
|---|
| 168 |
|
|---|
| 169 | extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 170 | extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 171 |
|
|---|
| 172 | extern int renameat (int __oldfd, const char *__old, int __newfd,
|
|---|
| 173 | const char *__new) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 174 |
|
|---|
| 175 | extern FILE *tmpfile (void) ;
|
|---|
| 176 | extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 177 |
|
|---|
| 178 | extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 179 | extern char *tempnam (const char *__dir, const char *__pfx)
|
|---|
| 180 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
|
|---|
| 181 |
|
|---|
| 182 | extern int fclose (FILE *__stream);
|
|---|
| 183 | extern int fflush (FILE *__stream);
|
|---|
| 184 |
|
|---|
| 185 | extern int fflush_unlocked (FILE *__stream);
|
|---|
| 186 |
|
|---|
| 187 | extern FILE *fopen (const char *__restrict __filename,
|
|---|
| 188 | const char *__restrict __modes) ;
|
|---|
| 189 | extern FILE *freopen (const char *__restrict __filename,
|
|---|
| 190 | const char *__restrict __modes,
|
|---|
| 191 | FILE *__restrict __stream) ;
|
|---|
| 192 |
|
|---|
| 193 | extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 194 | extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
|
|---|
| 195 | __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 196 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 197 |
|
|---|
| 198 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 199 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
|
|---|
| 200 | int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 201 |
|
|---|
| 202 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
|
|---|
| 203 | size_t __size) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 204 | extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 205 |
|
|---|
| 206 | extern int fprintf (FILE *__restrict __stream,
|
|---|
| 207 | const char *__restrict __format, ...);
|
|---|
| 208 | extern int printf (const char *__restrict __format, ...);
|
|---|
| 209 | extern int sprintf (char *__restrict __s,
|
|---|
| 210 | const char *__restrict __format, ...) __attribute__ ((__nothrow__));
|
|---|
| 211 | extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
|
|---|
| 212 | __gnuc_va_list __arg);
|
|---|
| 213 | extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
|
|---|
| 214 | extern int vsprintf (char *__restrict __s, const char *__restrict __format,
|
|---|
| 215 | __gnuc_va_list __arg) __attribute__ ((__nothrow__));
|
|---|
| 216 |
|
|---|
| 217 |
|
|---|
| 218 | extern int snprintf (char *__restrict __s, size_t __maxlen,
|
|---|
| 219 | const char *__restrict __format, ...)
|
|---|
| 220 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
|
|---|
| 221 | extern int vsnprintf (char *__restrict __s, size_t __maxlen,
|
|---|
| 222 | const char *__restrict __format, __gnuc_va_list __arg)
|
|---|
| 223 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
|
|---|
| 224 |
|
|---|
| 225 | extern int vdprintf (int __fd, const char *__restrict __fmt,
|
|---|
| 226 | __gnuc_va_list __arg)
|
|---|
| 227 | __attribute__ ((__format__ (__printf__, 2, 0)));
|
|---|
| 228 | extern int dprintf (int __fd, const char *__restrict __fmt, ...)
|
|---|
| 229 | __attribute__ ((__format__ (__printf__, 2, 3)));
|
|---|
| 230 |
|
|---|
| 231 | extern int fscanf (FILE *__restrict __stream,
|
|---|
| 232 | const char *__restrict __format, ...) ;
|
|---|
| 233 | extern int scanf (const char *__restrict __format, ...) ;
|
|---|
| 234 | extern int sscanf (const char *__restrict __s,
|
|---|
| 235 | const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 236 | extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") ;
|
|---|
| 237 | extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") ;
|
|---|
| 238 | extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 239 |
|
|---|
| 240 |
|
|---|
| 241 | extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
|
|---|
| 242 | __gnuc_va_list __arg)
|
|---|
| 243 | __attribute__ ((__format__ (__scanf__, 2, 0))) ;
|
|---|
| 244 | extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
|
|---|
| 245 | __attribute__ ((__format__ (__scanf__, 1, 0))) ;
|
|---|
| 246 | extern int vsscanf (const char *__restrict __s,
|
|---|
| 247 | const char *__restrict __format, __gnuc_va_list __arg)
|
|---|
| 248 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
|
|---|
| 249 | extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
|
|---|
| 250 | __attribute__ ((__format__ (__scanf__, 2, 0))) ;
|
|---|
| 251 | extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
|
|---|
| 252 | __attribute__ ((__format__ (__scanf__, 1, 0))) ;
|
|---|
| 253 | extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
|
|---|
| 254 | __attribute__ ((__format__ (__scanf__, 2, 0)));
|
|---|
| 255 |
|
|---|
| 256 |
|
|---|
| 257 | extern int fgetc (FILE *__stream);
|
|---|
| 258 | extern int getc (FILE *__stream);
|
|---|
| 259 | extern int getchar (void);
|
|---|
| 260 |
|
|---|
| 261 | extern int getc_unlocked (FILE *__stream);
|
|---|
| 262 | extern int getchar_unlocked (void);
|
|---|
| 263 | extern int fgetc_unlocked (FILE *__stream);
|
|---|
| 264 |
|
|---|
| 265 | extern int fputc (int __c, FILE *__stream);
|
|---|
| 266 | extern int putc (int __c, FILE *__stream);
|
|---|
| 267 | extern int putchar (int __c);
|
|---|
| 268 |
|
|---|
| 269 | extern int fputc_unlocked (int __c, FILE *__stream);
|
|---|
| 270 | extern int putc_unlocked (int __c, FILE *__stream);
|
|---|
| 271 | extern int putchar_unlocked (int __c);
|
|---|
| 272 | extern int getw (FILE *__stream);
|
|---|
| 273 | extern int putw (int __w, FILE *__stream);
|
|---|
| 274 |
|
|---|
| 275 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
|
|---|
| 276 | ;
|
|---|
| 277 |
|
|---|
| 278 | extern __ssize_t __getdelim (char **__restrict __lineptr,
|
|---|
| 279 | size_t *__restrict __n, int __delimiter,
|
|---|
| 280 | FILE *__restrict __stream) ;
|
|---|
| 281 | extern __ssize_t getdelim (char **__restrict __lineptr,
|
|---|
| 282 | size_t *__restrict __n, int __delimiter,
|
|---|
| 283 | FILE *__restrict __stream) ;
|
|---|
| 284 | extern __ssize_t getline (char **__restrict __lineptr,
|
|---|
| 285 | size_t *__restrict __n,
|
|---|
| 286 | FILE *__restrict __stream) ;
|
|---|
| 287 |
|
|---|
| 288 | extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
|
|---|
| 289 | extern int puts (const char *__s);
|
|---|
| 290 | extern int ungetc (int __c, FILE *__stream);
|
|---|
| 291 | extern size_t fread (void *__restrict __ptr, size_t __size,
|
|---|
| 292 | size_t __n, FILE *__restrict __stream) ;
|
|---|
| 293 | extern size_t fwrite (const void *__restrict __ptr, size_t __size,
|
|---|
| 294 | size_t __n, FILE *__restrict __s);
|
|---|
| 295 |
|
|---|
| 296 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
|
|---|
| 297 | size_t __n, FILE *__restrict __stream) ;
|
|---|
| 298 | extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
|
|---|
| 299 | size_t __n, FILE *__restrict __stream);
|
|---|
| 300 |
|
|---|
| 301 | extern int fseek (FILE *__stream, long int __off, int __whence);
|
|---|
| 302 | extern long int ftell (FILE *__stream) ;
|
|---|
| 303 | extern void rewind (FILE *__stream);
|
|---|
| 304 |
|
|---|
| 305 | extern int fseeko (FILE *__stream, __off_t __off, int __whence);
|
|---|
| 306 | extern __off_t ftello (FILE *__stream) ;
|
|---|
| 307 |
|
|---|
| 308 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
|
|---|
| 309 | extern int fsetpos (FILE *__stream, const fpos_t *__pos);
|
|---|
| 310 |
|
|---|
| 311 |
|
|---|
| 312 | extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 313 | extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 314 | extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 315 |
|
|---|
| 316 | extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 317 | extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 318 | extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 319 |
|
|---|
| 320 | extern void perror (const char *__s);
|
|---|
| 321 |
|
|---|
| 322 | extern int sys_nerr;
|
|---|
| 323 | extern const char *const sys_errlist[];
|
|---|
| 324 | extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 325 | extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 326 | extern FILE *popen (const char *__command, const char *__modes) ;
|
|---|
| 327 | extern int pclose (FILE *__stream);
|
|---|
| 328 | extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 329 | extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 330 | extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 331 | extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 332 |
|
|---|
| 333 | typedef long int wchar_t;
|
|---|
| 334 |
|
|---|
| 335 | typedef enum
|
|---|
| 336 | {
|
|---|
| 337 | P_ALL,
|
|---|
| 338 | P_PID,
|
|---|
| 339 | P_PGID
|
|---|
| 340 | } idtype_t;
|
|---|
| 341 | static __inline unsigned int
|
|---|
| 342 | __bswap_32 (unsigned int __bsx)
|
|---|
| 343 | {
|
|---|
| 344 | return __builtin_bswap32 (__bsx);
|
|---|
| 345 | }
|
|---|
| 346 | static __inline __uint64_t
|
|---|
| 347 | __bswap_64 (__uint64_t __bsx)
|
|---|
| 348 | {
|
|---|
| 349 | return __builtin_bswap64 (__bsx);
|
|---|
| 350 | }
|
|---|
| 351 | union wait
|
|---|
| 352 | {
|
|---|
| 353 | int w_status;
|
|---|
| 354 | struct
|
|---|
| 355 | {
|
|---|
| 356 | unsigned int __w_termsig:7;
|
|---|
| 357 | unsigned int __w_coredump:1;
|
|---|
| 358 | unsigned int __w_retcode:8;
|
|---|
| 359 | unsigned int:16;
|
|---|
| 360 | } __wait_terminated;
|
|---|
| 361 | struct
|
|---|
| 362 | {
|
|---|
| 363 | unsigned int __w_stopval:8;
|
|---|
| 364 | unsigned int __w_stopsig:8;
|
|---|
| 365 | unsigned int:16;
|
|---|
| 366 | } __wait_stopped;
|
|---|
| 367 | };
|
|---|
| 368 | typedef union
|
|---|
| 369 | {
|
|---|
| 370 | union wait *__uptr;
|
|---|
| 371 | int *__iptr;
|
|---|
| 372 | } __WAIT_STATUS __attribute__ ((__transparent_union__));
|
|---|
| 373 |
|
|---|
| 374 | typedef struct
|
|---|
| 375 | {
|
|---|
| 376 | int quot;
|
|---|
| 377 | int rem;
|
|---|
| 378 | } div_t;
|
|---|
| 379 | typedef struct
|
|---|
| 380 | {
|
|---|
| 381 | long int quot;
|
|---|
| 382 | long int rem;
|
|---|
| 383 | } ldiv_t;
|
|---|
| 384 |
|
|---|
| 385 |
|
|---|
| 386 | __extension__ typedef struct
|
|---|
| 387 | {
|
|---|
| 388 | long long int quot;
|
|---|
| 389 | long long int rem;
|
|---|
| 390 | } lldiv_t;
|
|---|
| 391 |
|
|---|
| 392 | extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 393 |
|
|---|
| 394 | extern double atof (const char *__nptr)
|
|---|
| 395 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 396 | extern int atoi (const char *__nptr)
|
|---|
| 397 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 398 | extern long int atol (const char *__nptr)
|
|---|
| 399 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 400 |
|
|---|
| 401 |
|
|---|
| 402 | __extension__ extern long long int atoll (const char *__nptr)
|
|---|
| 403 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 404 |
|
|---|
| 405 |
|
|---|
| 406 | extern double strtod (const char *__restrict __nptr,
|
|---|
| 407 | char **__restrict __endptr)
|
|---|
| 408 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 409 |
|
|---|
| 410 |
|
|---|
| 411 | extern float strtof (const char *__restrict __nptr,
|
|---|
| 412 | char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 413 | extern long double strtold (const char *__restrict __nptr,
|
|---|
| 414 | char **__restrict __endptr)
|
|---|
| 415 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 416 |
|
|---|
| 417 |
|
|---|
| 418 | extern long int strtol (const char *__restrict __nptr,
|
|---|
| 419 | char **__restrict __endptr, int __base)
|
|---|
| 420 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 421 | extern unsigned long int strtoul (const char *__restrict __nptr,
|
|---|
| 422 | char **__restrict __endptr, int __base)
|
|---|
| 423 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 424 |
|
|---|
| 425 | __extension__
|
|---|
| 426 | extern long long int strtoq (const char *__restrict __nptr,
|
|---|
| 427 | char **__restrict __endptr, int __base)
|
|---|
| 428 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 429 | __extension__
|
|---|
| 430 | extern unsigned long long int strtouq (const char *__restrict __nptr,
|
|---|
| 431 | char **__restrict __endptr, int __base)
|
|---|
| 432 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 433 |
|
|---|
| 434 | __extension__
|
|---|
| 435 | extern long long int strtoll (const char *__restrict __nptr,
|
|---|
| 436 | char **__restrict __endptr, int __base)
|
|---|
| 437 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 438 | __extension__
|
|---|
| 439 | extern unsigned long long int strtoull (const char *__restrict __nptr,
|
|---|
| 440 | char **__restrict __endptr, int __base)
|
|---|
| 441 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 442 |
|
|---|
| 443 | extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 444 | extern long int a64l (const char *__s)
|
|---|
| 445 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 446 |
|
|---|
| 447 | typedef __u_char u_char;
|
|---|
| 448 | typedef __u_short u_short;
|
|---|
| 449 | typedef __u_int u_int;
|
|---|
| 450 | typedef __u_long u_long;
|
|---|
| 451 | typedef __quad_t quad_t;
|
|---|
| 452 | typedef __u_quad_t u_quad_t;
|
|---|
| 453 | typedef __fsid_t fsid_t;
|
|---|
| 454 | typedef __loff_t loff_t;
|
|---|
| 455 | typedef __ino_t ino_t;
|
|---|
| 456 | typedef __dev_t dev_t;
|
|---|
| 457 | typedef __gid_t gid_t;
|
|---|
| 458 | typedef __mode_t mode_t;
|
|---|
| 459 | typedef __nlink_t nlink_t;
|
|---|
| 460 | typedef __uid_t uid_t;
|
|---|
| 461 | typedef __pid_t pid_t;
|
|---|
| 462 | typedef __id_t id_t;
|
|---|
| 463 | typedef __daddr_t daddr_t;
|
|---|
| 464 | typedef __caddr_t caddr_t;
|
|---|
| 465 | typedef __key_t key_t;
|
|---|
| 466 |
|
|---|
| 467 | typedef __clock_t clock_t;
|
|---|
| 468 |
|
|---|
| 469 |
|
|---|
| 470 |
|
|---|
| 471 | typedef __time_t time_t;
|
|---|
| 472 |
|
|---|
| 473 |
|
|---|
| 474 | typedef __clockid_t clockid_t;
|
|---|
| 475 | typedef __timer_t timer_t;
|
|---|
| 476 | typedef unsigned long int ulong;
|
|---|
| 477 | typedef unsigned short int ushort;
|
|---|
| 478 | typedef unsigned int uint;
|
|---|
| 479 | typedef int int8_t __attribute__ ((__mode__ (__QI__)));
|
|---|
| 480 | typedef int int16_t __attribute__ ((__mode__ (__HI__)));
|
|---|
| 481 | typedef int int32_t __attribute__ ((__mode__ (__SI__)));
|
|---|
| 482 | typedef int int64_t __attribute__ ((__mode__ (__DI__)));
|
|---|
| 483 | typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
|
|---|
| 484 | typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
|
|---|
| 485 | typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
|
|---|
| 486 | typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
|
|---|
| 487 | typedef int register_t __attribute__ ((__mode__ (__word__)));
|
|---|
| 488 | typedef int __sig_atomic_t;
|
|---|
| 489 | typedef struct
|
|---|
| 490 | {
|
|---|
| 491 | unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
|
|---|
| 492 | } __sigset_t;
|
|---|
| 493 | typedef __sigset_t sigset_t;
|
|---|
| 494 | struct timespec
|
|---|
| 495 | {
|
|---|
| 496 | __time_t tv_sec;
|
|---|
| 497 | __syscall_slong_t tv_nsec;
|
|---|
| 498 | };
|
|---|
| 499 | struct timeval
|
|---|
| 500 | {
|
|---|
| 501 | __time_t tv_sec;
|
|---|
| 502 | __suseconds_t tv_usec;
|
|---|
| 503 | };
|
|---|
| 504 | typedef __suseconds_t suseconds_t;
|
|---|
| 505 | typedef long int __fd_mask;
|
|---|
| 506 | typedef struct
|
|---|
| 507 | {
|
|---|
| 508 | __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
|
|---|
| 509 | } fd_set;
|
|---|
| 510 | typedef __fd_mask fd_mask;
|
|---|
| 511 |
|
|---|
| 512 | extern int select (int __nfds, fd_set *__restrict __readfds,
|
|---|
| 513 | fd_set *__restrict __writefds,
|
|---|
| 514 | fd_set *__restrict __exceptfds,
|
|---|
| 515 | struct timeval *__restrict __timeout);
|
|---|
| 516 | extern int pselect (int __nfds, fd_set *__restrict __readfds,
|
|---|
| 517 | fd_set *__restrict __writefds,
|
|---|
| 518 | fd_set *__restrict __exceptfds,
|
|---|
| 519 | const struct timespec *__restrict __timeout,
|
|---|
| 520 | const __sigset_t *__restrict __sigmask);
|
|---|
| 521 |
|
|---|
| 522 |
|
|---|
| 523 | __extension__
|
|---|
| 524 | extern unsigned int gnu_dev_major (unsigned long long int __dev)
|
|---|
| 525 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
|
|---|
| 526 | __extension__
|
|---|
| 527 | extern unsigned int gnu_dev_minor (unsigned long long int __dev)
|
|---|
| 528 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
|
|---|
| 529 | __extension__
|
|---|
| 530 | extern unsigned long long int gnu_dev_makedev (unsigned int __major,
|
|---|
| 531 | unsigned int __minor)
|
|---|
| 532 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
|
|---|
| 533 |
|
|---|
| 534 | typedef __blksize_t blksize_t;
|
|---|
| 535 | typedef __blkcnt_t blkcnt_t;
|
|---|
| 536 | typedef __fsblkcnt_t fsblkcnt_t;
|
|---|
| 537 | typedef __fsfilcnt_t fsfilcnt_t;
|
|---|
| 538 | typedef unsigned long int pthread_t;
|
|---|
| 539 | union pthread_attr_t
|
|---|
| 540 | {
|
|---|
| 541 | char __size[36];
|
|---|
| 542 | long int __align;
|
|---|
| 543 | };
|
|---|
| 544 | typedef union pthread_attr_t pthread_attr_t;
|
|---|
| 545 | typedef struct __pthread_internal_slist
|
|---|
| 546 | {
|
|---|
| 547 | struct __pthread_internal_slist *__next;
|
|---|
| 548 | } __pthread_slist_t;
|
|---|
| 549 | typedef union
|
|---|
| 550 | {
|
|---|
| 551 | struct __pthread_mutex_s
|
|---|
| 552 | {
|
|---|
| 553 | int __lock;
|
|---|
| 554 | unsigned int __count;
|
|---|
| 555 | int __owner;
|
|---|
| 556 | int __kind;
|
|---|
| 557 | unsigned int __nusers;
|
|---|
| 558 | __extension__ union
|
|---|
| 559 | {
|
|---|
| 560 | struct
|
|---|
| 561 | {
|
|---|
| 562 | short __espins;
|
|---|
| 563 | short __elision;
|
|---|
| 564 | } __elision_data;
|
|---|
| 565 | __pthread_slist_t __list;
|
|---|
| 566 | };
|
|---|
| 567 | } __data;
|
|---|
| 568 | char __size[24];
|
|---|
| 569 | long int __align;
|
|---|
| 570 | } pthread_mutex_t;
|
|---|
| 571 | typedef union
|
|---|
| 572 | {
|
|---|
| 573 | char __size[4];
|
|---|
| 574 | int __align;
|
|---|
| 575 | } pthread_mutexattr_t;
|
|---|
| 576 | typedef union
|
|---|
| 577 | {
|
|---|
| 578 | struct
|
|---|
| 579 | {
|
|---|
| 580 | int __lock;
|
|---|
| 581 | unsigned int __futex;
|
|---|
| 582 | __extension__ unsigned long long int __total_seq;
|
|---|
| 583 | __extension__ unsigned long long int __wakeup_seq;
|
|---|
| 584 | __extension__ unsigned long long int __woken_seq;
|
|---|
| 585 | void *__mutex;
|
|---|
| 586 | unsigned int __nwaiters;
|
|---|
| 587 | unsigned int __broadcast_seq;
|
|---|
| 588 | } __data;
|
|---|
| 589 | char __size[48];
|
|---|
| 590 | __extension__ long long int __align;
|
|---|
| 591 | } pthread_cond_t;
|
|---|
| 592 | typedef union
|
|---|
| 593 | {
|
|---|
| 594 | char __size[4];
|
|---|
| 595 | int __align;
|
|---|
| 596 | } pthread_condattr_t;
|
|---|
| 597 | typedef unsigned int pthread_key_t;
|
|---|
| 598 | typedef int pthread_once_t;
|
|---|
| 599 | typedef union
|
|---|
| 600 | {
|
|---|
| 601 | struct
|
|---|
| 602 | {
|
|---|
| 603 | int __lock;
|
|---|
| 604 | unsigned int __nr_readers;
|
|---|
| 605 | unsigned int __readers_wakeup;
|
|---|
| 606 | unsigned int __writer_wakeup;
|
|---|
| 607 | unsigned int __nr_readers_queued;
|
|---|
| 608 | unsigned int __nr_writers_queued;
|
|---|
| 609 | unsigned char __flags;
|
|---|
| 610 | unsigned char __shared;
|
|---|
| 611 | signed char __rwelision;
|
|---|
| 612 | unsigned char __pad2;
|
|---|
| 613 | int __writer;
|
|---|
| 614 | } __data;
|
|---|
| 615 | char __size[32];
|
|---|
| 616 | long int __align;
|
|---|
| 617 | } pthread_rwlock_t;
|
|---|
| 618 | typedef union
|
|---|
| 619 | {
|
|---|
| 620 | char __size[8];
|
|---|
| 621 | long int __align;
|
|---|
| 622 | } pthread_rwlockattr_t;
|
|---|
| 623 | typedef volatile int pthread_spinlock_t;
|
|---|
| 624 | typedef union
|
|---|
| 625 | {
|
|---|
| 626 | char __size[20];
|
|---|
| 627 | long int __align;
|
|---|
| 628 | } pthread_barrier_t;
|
|---|
| 629 | typedef union
|
|---|
| 630 | {
|
|---|
| 631 | char __size[4];
|
|---|
| 632 | int __align;
|
|---|
| 633 | } pthread_barrierattr_t;
|
|---|
| 634 |
|
|---|
| 635 | extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 636 | extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 637 | extern char *initstate (unsigned int __seed, char *__statebuf,
|
|---|
| 638 | size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
|
|---|
| 639 | extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 640 | struct random_data
|
|---|
| 641 | {
|
|---|
| 642 | int32_t *fptr;
|
|---|
| 643 | int32_t *rptr;
|
|---|
| 644 | int32_t *state;
|
|---|
| 645 | int rand_type;
|
|---|
| 646 | int rand_deg;
|
|---|
| 647 | int rand_sep;
|
|---|
| 648 | int32_t *end_ptr;
|
|---|
| 649 | };
|
|---|
| 650 | extern int random_r (struct random_data *__restrict __buf,
|
|---|
| 651 | int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 652 | extern int srandom_r (unsigned int __seed, struct random_data *__buf)
|
|---|
| 653 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
|
|---|
| 654 | extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
|
|---|
| 655 | size_t __statelen,
|
|---|
| 656 | struct random_data *__restrict __buf)
|
|---|
| 657 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
|
|---|
| 658 | extern int setstate_r (char *__restrict __statebuf,
|
|---|
| 659 | struct random_data *__restrict __buf)
|
|---|
| 660 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 661 |
|
|---|
| 662 | extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 663 | extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 664 |
|
|---|
| 665 | extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 666 | extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 667 | extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 668 | extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 669 | extern long int nrand48 (unsigned short int __xsubi[3])
|
|---|
| 670 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 671 | extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 672 | extern long int jrand48 (unsigned short int __xsubi[3])
|
|---|
| 673 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 674 | extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 675 | extern unsigned short int *seed48 (unsigned short int __seed16v[3])
|
|---|
| 676 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 677 | extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 678 | struct drand48_data
|
|---|
| 679 | {
|
|---|
| 680 | unsigned short int __x[3];
|
|---|
| 681 | unsigned short int __old_x[3];
|
|---|
| 682 | unsigned short int __c;
|
|---|
| 683 | unsigned short int __init;
|
|---|
| 684 | __extension__ unsigned long long int __a;
|
|---|
| 685 | };
|
|---|
| 686 | extern int drand48_r (struct drand48_data *__restrict __buffer,
|
|---|
| 687 | double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 688 | extern int erand48_r (unsigned short int __xsubi[3],
|
|---|
| 689 | struct drand48_data *__restrict __buffer,
|
|---|
| 690 | double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 691 | extern int lrand48_r (struct drand48_data *__restrict __buffer,
|
|---|
| 692 | long int *__restrict __result)
|
|---|
| 693 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 694 | extern int nrand48_r (unsigned short int __xsubi[3],
|
|---|
| 695 | struct drand48_data *__restrict __buffer,
|
|---|
| 696 | long int *__restrict __result)
|
|---|
| 697 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 698 | extern int mrand48_r (struct drand48_data *__restrict __buffer,
|
|---|
| 699 | long int *__restrict __result)
|
|---|
| 700 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 701 | extern int jrand48_r (unsigned short int __xsubi[3],
|
|---|
| 702 | struct drand48_data *__restrict __buffer,
|
|---|
| 703 | long int *__restrict __result)
|
|---|
| 704 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 705 | extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
|
|---|
| 706 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
|
|---|
| 707 | extern int seed48_r (unsigned short int __seed16v[3],
|
|---|
| 708 | struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 709 | extern int lcong48_r (unsigned short int __param[7],
|
|---|
| 710 | struct drand48_data *__buffer)
|
|---|
| 711 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 712 |
|
|---|
| 713 | extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
|
|---|
| 714 | extern void *calloc (size_t __nmemb, size_t __size)
|
|---|
| 715 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
|
|---|
| 716 |
|
|---|
| 717 |
|
|---|
| 718 | extern void *realloc (void *__ptr, size_t __size)
|
|---|
| 719 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
|
|---|
| 720 | extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 721 |
|
|---|
| 722 | extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 723 |
|
|---|
| 724 | extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 725 |
|
|---|
| 726 | extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
|
|---|
| 727 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
|
|---|
| 728 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 729 | extern void *aligned_alloc (size_t __alignment, size_t __size)
|
|---|
| 730 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) ;
|
|---|
| 731 |
|
|---|
| 732 | extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
|
|---|
| 733 | extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 734 | extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 735 |
|
|---|
| 736 | extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
|
|---|
| 737 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 738 |
|
|---|
| 739 | extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
|
|---|
| 740 | extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
|
|---|
| 741 |
|
|---|
| 742 |
|
|---|
| 743 | extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
|
|---|
| 744 |
|
|---|
| 745 |
|
|---|
| 746 | extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 747 |
|
|---|
| 748 | extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 749 | extern int setenv (const char *__name, const char *__value, int __replace)
|
|---|
| 750 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
|
|---|
| 751 | extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 752 | extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 753 | extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 754 | extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 755 | extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 756 | extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 757 |
|
|---|
| 758 | extern int system (const char *__command) ;
|
|---|
| 759 |
|
|---|
| 760 | extern char *realpath (const char *__restrict __name,
|
|---|
| 761 | char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 762 | typedef int (*__compar_fn_t) (const void *, const void *);
|
|---|
| 763 |
|
|---|
| 764 | extern void *bsearch (const void *__key, const void *__base,
|
|---|
| 765 | size_t __nmemb, size_t __size, __compar_fn_t __compar)
|
|---|
| 766 | __attribute__ ((__nonnull__ (1, 2, 5))) ;
|
|---|
| 767 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
|
|---|
| 768 | __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
|
|---|
| 769 | extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
|
|---|
| 770 | extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
|
|---|
| 771 |
|
|---|
| 772 | __extension__ extern long long int llabs (long long int __x)
|
|---|
| 773 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
|
|---|
| 774 |
|
|---|
| 775 | extern div_t div (int __numer, int __denom)
|
|---|
| 776 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
|
|---|
| 777 | extern ldiv_t ldiv (long int __numer, long int __denom)
|
|---|
| 778 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
|
|---|
| 779 |
|
|---|
| 780 |
|
|---|
| 781 | __extension__ extern lldiv_t lldiv (long long int __numer,
|
|---|
| 782 | long long int __denom)
|
|---|
| 783 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
|
|---|
| 784 |
|
|---|
| 785 | extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
|
|---|
| 786 | int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
|
|---|
| 787 | extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
|
|---|
| 788 | int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
|
|---|
| 789 | extern char *gcvt (double __value, int __ndigit, char *__buf)
|
|---|
| 790 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
|
|---|
| 791 | extern char *qecvt (long double __value, int __ndigit,
|
|---|
| 792 | int *__restrict __decpt, int *__restrict __sign)
|
|---|
| 793 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
|
|---|
| 794 | extern char *qfcvt (long double __value, int __ndigit,
|
|---|
| 795 | int *__restrict __decpt, int *__restrict __sign)
|
|---|
| 796 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
|
|---|
| 797 | extern char *qgcvt (long double __value, int __ndigit, char *__buf)
|
|---|
| 798 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
|
|---|
| 799 | extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
|
|---|
| 800 | int *__restrict __sign, char *__restrict __buf,
|
|---|
| 801 | size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
|
|---|
| 802 | extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
|
|---|
| 803 | int *__restrict __sign, char *__restrict __buf,
|
|---|
| 804 | size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
|
|---|
| 805 | extern int qecvt_r (long double __value, int __ndigit,
|
|---|
| 806 | int *__restrict __decpt, int *__restrict __sign,
|
|---|
| 807 | char *__restrict __buf, size_t __len)
|
|---|
| 808 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
|
|---|
| 809 | extern int qfcvt_r (long double __value, int __ndigit,
|
|---|
| 810 | int *__restrict __decpt, int *__restrict __sign,
|
|---|
| 811 | char *__restrict __buf, size_t __len)
|
|---|
| 812 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
|
|---|
| 813 |
|
|---|
| 814 | extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 815 | extern int mbtowc (wchar_t *__restrict __pwc,
|
|---|
| 816 | const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 817 | extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 818 | extern size_t mbstowcs (wchar_t *__restrict __pwcs,
|
|---|
| 819 | const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 820 | extern size_t wcstombs (char *__restrict __s,
|
|---|
| 821 | const wchar_t *__restrict __pwcs, size_t __n)
|
|---|
| 822 | __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 823 |
|
|---|
| 824 | extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 825 | extern int getsubopt (char **__restrict __optionp,
|
|---|
| 826 | char *const *__restrict __tokens,
|
|---|
| 827 | char **__restrict __valuep)
|
|---|
| 828 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
|
|---|
| 829 | extern int getloadavg (double __loadavg[], int __nelem)
|
|---|
| 830 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 831 |
|
|---|
| 832 |
|
|---|
| 833 | typedef __useconds_t useconds_t;
|
|---|
| 834 | typedef __intptr_t intptr_t;
|
|---|
| 835 | typedef __socklen_t socklen_t;
|
|---|
| 836 | extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 837 | extern int faccessat (int __fd, const char *__file, int __type, int __flag)
|
|---|
| 838 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) ;
|
|---|
| 839 | extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 840 | extern int close (int __fd);
|
|---|
| 841 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
|
|---|
| 842 | extern ssize_t write (int __fd, const void *__buf, size_t __n) ;
|
|---|
| 843 | extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
|
|---|
| 844 | __off_t __offset) ;
|
|---|
| 845 | extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
|
|---|
| 846 | __off_t __offset) ;
|
|---|
| 847 | extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 848 | extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 849 | extern unsigned int sleep (unsigned int __seconds);
|
|---|
| 850 | extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
|
|---|
| 851 | __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 852 | extern int usleep (__useconds_t __useconds);
|
|---|
| 853 | extern int pause (void);
|
|---|
| 854 | extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
|
|---|
| 855 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 856 | extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 857 | extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
|
|---|
| 858 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 859 | extern int fchownat (int __fd, const char *__file, __uid_t __owner,
|
|---|
| 860 | __gid_t __group, int __flag)
|
|---|
| 861 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) ;
|
|---|
| 862 | extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 863 | extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 864 | extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 865 | extern char *getwd (char *__buf)
|
|---|
| 866 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;
|
|---|
| 867 | extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 868 | extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 869 | extern char **__environ;
|
|---|
| 870 | extern int execve (const char *__path, char *const __argv[],
|
|---|
| 871 | char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 872 | extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
|
|---|
| 873 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
|
|---|
| 874 | extern int execv (const char *__path, char *const __argv[])
|
|---|
| 875 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 876 | extern int execle (const char *__path, const char *__arg, ...)
|
|---|
| 877 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 878 | extern int execl (const char *__path, const char *__arg, ...)
|
|---|
| 879 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 880 | extern int execvp (const char *__file, char *const __argv[])
|
|---|
| 881 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 882 | extern int execlp (const char *__file, const char *__arg, ...)
|
|---|
| 883 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 884 | extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 885 | extern void _exit (int __status) __attribute__ ((__noreturn__));
|
|---|
| 886 | enum
|
|---|
| 887 | {
|
|---|
| 888 | _PC_LINK_MAX,
|
|---|
| 889 | _PC_MAX_CANON,
|
|---|
| 890 | _PC_MAX_INPUT,
|
|---|
| 891 | _PC_NAME_MAX,
|
|---|
| 892 | _PC_PATH_MAX,
|
|---|
| 893 | _PC_PIPE_BUF,
|
|---|
| 894 | _PC_CHOWN_RESTRICTED,
|
|---|
| 895 | _PC_NO_TRUNC,
|
|---|
| 896 | _PC_VDISABLE,
|
|---|
| 897 | _PC_SYNC_IO,
|
|---|
| 898 | _PC_ASYNC_IO,
|
|---|
| 899 | _PC_PRIO_IO,
|
|---|
| 900 | _PC_SOCK_MAXBUF,
|
|---|
| 901 | _PC_FILESIZEBITS,
|
|---|
| 902 | _PC_REC_INCR_XFER_SIZE,
|
|---|
| 903 | _PC_REC_MAX_XFER_SIZE,
|
|---|
| 904 | _PC_REC_MIN_XFER_SIZE,
|
|---|
| 905 | _PC_REC_XFER_ALIGN,
|
|---|
| 906 | _PC_ALLOC_SIZE_MIN,
|
|---|
| 907 | _PC_SYMLINK_MAX,
|
|---|
| 908 | _PC_2_SYMLINKS
|
|---|
| 909 | };
|
|---|
| 910 | enum
|
|---|
| 911 | {
|
|---|
| 912 | _SC_ARG_MAX,
|
|---|
| 913 | _SC_CHILD_MAX,
|
|---|
| 914 | _SC_CLK_TCK,
|
|---|
| 915 | _SC_NGROUPS_MAX,
|
|---|
| 916 | _SC_OPEN_MAX,
|
|---|
| 917 | _SC_STREAM_MAX,
|
|---|
| 918 | _SC_TZNAME_MAX,
|
|---|
| 919 | _SC_JOB_CONTROL,
|
|---|
| 920 | _SC_SAVED_IDS,
|
|---|
| 921 | _SC_REALTIME_SIGNALS,
|
|---|
| 922 | _SC_PRIORITY_SCHEDULING,
|
|---|
| 923 | _SC_TIMERS,
|
|---|
| 924 | _SC_ASYNCHRONOUS_IO,
|
|---|
| 925 | _SC_PRIORITIZED_IO,
|
|---|
| 926 | _SC_SYNCHRONIZED_IO,
|
|---|
| 927 | _SC_FSYNC,
|
|---|
| 928 | _SC_MAPPED_FILES,
|
|---|
| 929 | _SC_MEMLOCK,
|
|---|
| 930 | _SC_MEMLOCK_RANGE,
|
|---|
| 931 | _SC_MEMORY_PROTECTION,
|
|---|
| 932 | _SC_MESSAGE_PASSING,
|
|---|
| 933 | _SC_SEMAPHORES,
|
|---|
| 934 | _SC_SHARED_MEMORY_OBJECTS,
|
|---|
| 935 | _SC_AIO_LISTIO_MAX,
|
|---|
| 936 | _SC_AIO_MAX,
|
|---|
| 937 | _SC_AIO_PRIO_DELTA_MAX,
|
|---|
| 938 | _SC_DELAYTIMER_MAX,
|
|---|
| 939 | _SC_MQ_OPEN_MAX,
|
|---|
| 940 | _SC_MQ_PRIO_MAX,
|
|---|
| 941 | _SC_VERSION,
|
|---|
| 942 | _SC_PAGESIZE,
|
|---|
| 943 | _SC_RTSIG_MAX,
|
|---|
| 944 | _SC_SEM_NSEMS_MAX,
|
|---|
| 945 | _SC_SEM_VALUE_MAX,
|
|---|
| 946 | _SC_SIGQUEUE_MAX,
|
|---|
| 947 | _SC_TIMER_MAX,
|
|---|
| 948 | _SC_BC_BASE_MAX,
|
|---|
| 949 | _SC_BC_DIM_MAX,
|
|---|
| 950 | _SC_BC_SCALE_MAX,
|
|---|
| 951 | _SC_BC_STRING_MAX,
|
|---|
| 952 | _SC_COLL_WEIGHTS_MAX,
|
|---|
| 953 | _SC_EQUIV_CLASS_MAX,
|
|---|
| 954 | _SC_EXPR_NEST_MAX,
|
|---|
| 955 | _SC_LINE_MAX,
|
|---|
| 956 | _SC_RE_DUP_MAX,
|
|---|
| 957 | _SC_CHARCLASS_NAME_MAX,
|
|---|
| 958 | _SC_2_VERSION,
|
|---|
| 959 | _SC_2_C_BIND,
|
|---|
| 960 | _SC_2_C_DEV,
|
|---|
| 961 | _SC_2_FORT_DEV,
|
|---|
| 962 | _SC_2_FORT_RUN,
|
|---|
| 963 | _SC_2_SW_DEV,
|
|---|
| 964 | _SC_2_LOCALEDEF,
|
|---|
| 965 | _SC_PII,
|
|---|
| 966 | _SC_PII_XTI,
|
|---|
| 967 | _SC_PII_SOCKET,
|
|---|
| 968 | _SC_PII_INTERNET,
|
|---|
| 969 | _SC_PII_OSI,
|
|---|
| 970 | _SC_POLL,
|
|---|
| 971 | _SC_SELECT,
|
|---|
| 972 | _SC_UIO_MAXIOV,
|
|---|
| 973 | _SC_IOV_MAX = _SC_UIO_MAXIOV,
|
|---|
| 974 | _SC_PII_INTERNET_STREAM,
|
|---|
| 975 | _SC_PII_INTERNET_DGRAM,
|
|---|
| 976 | _SC_PII_OSI_COTS,
|
|---|
| 977 | _SC_PII_OSI_CLTS,
|
|---|
| 978 | _SC_PII_OSI_M,
|
|---|
| 979 | _SC_T_IOV_MAX,
|
|---|
| 980 | _SC_THREADS,
|
|---|
| 981 | _SC_THREAD_SAFE_FUNCTIONS,
|
|---|
| 982 | _SC_GETGR_R_SIZE_MAX,
|
|---|
| 983 | _SC_GETPW_R_SIZE_MAX,
|
|---|
| 984 | _SC_LOGIN_NAME_MAX,
|
|---|
| 985 | _SC_TTY_NAME_MAX,
|
|---|
| 986 | _SC_THREAD_DESTRUCTOR_ITERATIONS,
|
|---|
| 987 | _SC_THREAD_KEYS_MAX,
|
|---|
| 988 | _SC_THREAD_STACK_MIN,
|
|---|
| 989 | _SC_THREAD_THREADS_MAX,
|
|---|
| 990 | _SC_THREAD_ATTR_STACKADDR,
|
|---|
| 991 | _SC_THREAD_ATTR_STACKSIZE,
|
|---|
| 992 | _SC_THREAD_PRIORITY_SCHEDULING,
|
|---|
| 993 | _SC_THREAD_PRIO_INHERIT,
|
|---|
| 994 | _SC_THREAD_PRIO_PROTECT,
|
|---|
| 995 | _SC_THREAD_PROCESS_SHARED,
|
|---|
| 996 | _SC_NPROCESSORS_CONF,
|
|---|
| 997 | _SC_NPROCESSORS_ONLN,
|
|---|
| 998 | _SC_PHYS_PAGES,
|
|---|
| 999 | _SC_AVPHYS_PAGES,
|
|---|
| 1000 | _SC_ATEXIT_MAX,
|
|---|
| 1001 | _SC_PASS_MAX,
|
|---|
| 1002 | _SC_XOPEN_VERSION,
|
|---|
| 1003 | _SC_XOPEN_XCU_VERSION,
|
|---|
| 1004 | _SC_XOPEN_UNIX,
|
|---|
| 1005 | _SC_XOPEN_CRYPT,
|
|---|
| 1006 | _SC_XOPEN_ENH_I18N,
|
|---|
| 1007 | _SC_XOPEN_SHM,
|
|---|
| 1008 | _SC_2_CHAR_TERM,
|
|---|
| 1009 | _SC_2_C_VERSION,
|
|---|
| 1010 | _SC_2_UPE,
|
|---|
| 1011 | _SC_XOPEN_XPG2,
|
|---|
| 1012 | _SC_XOPEN_XPG3,
|
|---|
| 1013 | _SC_XOPEN_XPG4,
|
|---|
| 1014 | _SC_CHAR_BIT,
|
|---|
| 1015 | _SC_CHAR_MAX,
|
|---|
| 1016 | _SC_CHAR_MIN,
|
|---|
| 1017 | _SC_INT_MAX,
|
|---|
| 1018 | _SC_INT_MIN,
|
|---|
| 1019 | _SC_LONG_BIT,
|
|---|
| 1020 | _SC_WORD_BIT,
|
|---|
| 1021 | _SC_MB_LEN_MAX,
|
|---|
| 1022 | _SC_NZERO,
|
|---|
| 1023 | _SC_SSIZE_MAX,
|
|---|
| 1024 | _SC_SCHAR_MAX,
|
|---|
| 1025 | _SC_SCHAR_MIN,
|
|---|
| 1026 | _SC_SHRT_MAX,
|
|---|
| 1027 | _SC_SHRT_MIN,
|
|---|
| 1028 | _SC_UCHAR_MAX,
|
|---|
| 1029 | _SC_UINT_MAX,
|
|---|
| 1030 | _SC_ULONG_MAX,
|
|---|
| 1031 | _SC_USHRT_MAX,
|
|---|
| 1032 | _SC_NL_ARGMAX,
|
|---|
| 1033 | _SC_NL_LANGMAX,
|
|---|
| 1034 | _SC_NL_MSGMAX,
|
|---|
| 1035 | _SC_NL_NMAX,
|
|---|
| 1036 | _SC_NL_SETMAX,
|
|---|
| 1037 | _SC_NL_TEXTMAX,
|
|---|
| 1038 | _SC_XBS5_ILP32_OFF32,
|
|---|
| 1039 | _SC_XBS5_ILP32_OFFBIG,
|
|---|
| 1040 | _SC_XBS5_LP64_OFF64,
|
|---|
| 1041 | _SC_XBS5_LPBIG_OFFBIG,
|
|---|
| 1042 | _SC_XOPEN_LEGACY,
|
|---|
| 1043 | _SC_XOPEN_REALTIME,
|
|---|
| 1044 | _SC_XOPEN_REALTIME_THREADS,
|
|---|
| 1045 | _SC_ADVISORY_INFO,
|
|---|
| 1046 | _SC_BARRIERS,
|
|---|
| 1047 | _SC_BASE,
|
|---|
| 1048 | _SC_C_LANG_SUPPORT,
|
|---|
| 1049 | _SC_C_LANG_SUPPORT_R,
|
|---|
| 1050 | _SC_CLOCK_SELECTION,
|
|---|
| 1051 | _SC_CPUTIME,
|
|---|
| 1052 | _SC_THREAD_CPUTIME,
|
|---|
| 1053 | _SC_DEVICE_IO,
|
|---|
| 1054 | _SC_DEVICE_SPECIFIC,
|
|---|
| 1055 | _SC_DEVICE_SPECIFIC_R,
|
|---|
| 1056 | _SC_FD_MGMT,
|
|---|
| 1057 | _SC_FIFO,
|
|---|
| 1058 | _SC_PIPE,
|
|---|
| 1059 | _SC_FILE_ATTRIBUTES,
|
|---|
| 1060 | _SC_FILE_LOCKING,
|
|---|
| 1061 | _SC_FILE_SYSTEM,
|
|---|
| 1062 | _SC_MONOTONIC_CLOCK,
|
|---|
| 1063 | _SC_MULTI_PROCESS,
|
|---|
| 1064 | _SC_SINGLE_PROCESS,
|
|---|
| 1065 | _SC_NETWORKING,
|
|---|
| 1066 | _SC_READER_WRITER_LOCKS,
|
|---|
| 1067 | _SC_SPIN_LOCKS,
|
|---|
| 1068 | _SC_REGEXP,
|
|---|
| 1069 | _SC_REGEX_VERSION,
|
|---|
| 1070 | _SC_SHELL,
|
|---|
| 1071 | _SC_SIGNALS,
|
|---|
| 1072 | _SC_SPAWN,
|
|---|
| 1073 | _SC_SPORADIC_SERVER,
|
|---|
| 1074 | _SC_THREAD_SPORADIC_SERVER,
|
|---|
| 1075 | _SC_SYSTEM_DATABASE,
|
|---|
| 1076 | _SC_SYSTEM_DATABASE_R,
|
|---|
| 1077 | _SC_TIMEOUTS,
|
|---|
| 1078 | _SC_TYPED_MEMORY_OBJECTS,
|
|---|
| 1079 | _SC_USER_GROUPS,
|
|---|
| 1080 | _SC_USER_GROUPS_R,
|
|---|
| 1081 | _SC_2_PBS,
|
|---|
| 1082 | _SC_2_PBS_ACCOUNTING,
|
|---|
| 1083 | _SC_2_PBS_LOCATE,
|
|---|
| 1084 | _SC_2_PBS_MESSAGE,
|
|---|
| 1085 | _SC_2_PBS_TRACK,
|
|---|
| 1086 | _SC_SYMLOOP_MAX,
|
|---|
| 1087 | _SC_STREAMS,
|
|---|
| 1088 | _SC_2_PBS_CHECKPOINT,
|
|---|
| 1089 | _SC_V6_ILP32_OFF32,
|
|---|
| 1090 | _SC_V6_ILP32_OFFBIG,
|
|---|
| 1091 | _SC_V6_LP64_OFF64,
|
|---|
| 1092 | _SC_V6_LPBIG_OFFBIG,
|
|---|
| 1093 | _SC_HOST_NAME_MAX,
|
|---|
| 1094 | _SC_TRACE,
|
|---|
| 1095 | _SC_TRACE_EVENT_FILTER,
|
|---|
| 1096 | _SC_TRACE_INHERIT,
|
|---|
| 1097 | _SC_TRACE_LOG,
|
|---|
| 1098 | _SC_LEVEL1_ICACHE_SIZE,
|
|---|
| 1099 | _SC_LEVEL1_ICACHE_ASSOC,
|
|---|
| 1100 | _SC_LEVEL1_ICACHE_LINESIZE,
|
|---|
| 1101 | _SC_LEVEL1_DCACHE_SIZE,
|
|---|
| 1102 | _SC_LEVEL1_DCACHE_ASSOC,
|
|---|
| 1103 | _SC_LEVEL1_DCACHE_LINESIZE,
|
|---|
| 1104 | _SC_LEVEL2_CACHE_SIZE,
|
|---|
| 1105 | _SC_LEVEL2_CACHE_ASSOC,
|
|---|
| 1106 | _SC_LEVEL2_CACHE_LINESIZE,
|
|---|
| 1107 | _SC_LEVEL3_CACHE_SIZE,
|
|---|
| 1108 | _SC_LEVEL3_CACHE_ASSOC,
|
|---|
| 1109 | _SC_LEVEL3_CACHE_LINESIZE,
|
|---|
| 1110 | _SC_LEVEL4_CACHE_SIZE,
|
|---|
| 1111 | _SC_LEVEL4_CACHE_ASSOC,
|
|---|
| 1112 | _SC_LEVEL4_CACHE_LINESIZE,
|
|---|
| 1113 | _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
|
|---|
| 1114 | _SC_RAW_SOCKETS,
|
|---|
| 1115 | _SC_V7_ILP32_OFF32,
|
|---|
| 1116 | _SC_V7_ILP32_OFFBIG,
|
|---|
| 1117 | _SC_V7_LP64_OFF64,
|
|---|
| 1118 | _SC_V7_LPBIG_OFFBIG,
|
|---|
| 1119 | _SC_SS_REPL_MAX,
|
|---|
| 1120 | _SC_TRACE_EVENT_NAME_MAX,
|
|---|
| 1121 | _SC_TRACE_NAME_MAX,
|
|---|
| 1122 | _SC_TRACE_SYS_MAX,
|
|---|
| 1123 | _SC_TRACE_USER_EVENT_MAX,
|
|---|
| 1124 | _SC_XOPEN_STREAMS,
|
|---|
| 1125 | _SC_THREAD_ROBUST_PRIO_INHERIT,
|
|---|
| 1126 | _SC_THREAD_ROBUST_PRIO_PROTECT
|
|---|
| 1127 | };
|
|---|
| 1128 | enum
|
|---|
| 1129 | {
|
|---|
| 1130 | _CS_PATH,
|
|---|
| 1131 | _CS_V6_WIDTH_RESTRICTED_ENVS,
|
|---|
| 1132 | _CS_GNU_LIBC_VERSION,
|
|---|
| 1133 | _CS_GNU_LIBPTHREAD_VERSION,
|
|---|
| 1134 | _CS_V5_WIDTH_RESTRICTED_ENVS,
|
|---|
| 1135 | _CS_V7_WIDTH_RESTRICTED_ENVS,
|
|---|
| 1136 | _CS_LFS_CFLAGS = 1000,
|
|---|
| 1137 | _CS_LFS_LDFLAGS,
|
|---|
| 1138 | _CS_LFS_LIBS,
|
|---|
| 1139 | _CS_LFS_LINTFLAGS,
|
|---|
| 1140 | _CS_LFS64_CFLAGS,
|
|---|
| 1141 | _CS_LFS64_LDFLAGS,
|
|---|
| 1142 | _CS_LFS64_LIBS,
|
|---|
| 1143 | _CS_LFS64_LINTFLAGS,
|
|---|
| 1144 | _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
|
|---|
| 1145 | _CS_XBS5_ILP32_OFF32_LDFLAGS,
|
|---|
| 1146 | _CS_XBS5_ILP32_OFF32_LIBS,
|
|---|
| 1147 | _CS_XBS5_ILP32_OFF32_LINTFLAGS,
|
|---|
| 1148 | _CS_XBS5_ILP32_OFFBIG_CFLAGS,
|
|---|
| 1149 | _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
|
|---|
| 1150 | _CS_XBS5_ILP32_OFFBIG_LIBS,
|
|---|
| 1151 | _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
|
|---|
| 1152 | _CS_XBS5_LP64_OFF64_CFLAGS,
|
|---|
| 1153 | _CS_XBS5_LP64_OFF64_LDFLAGS,
|
|---|
| 1154 | _CS_XBS5_LP64_OFF64_LIBS,
|
|---|
| 1155 | _CS_XBS5_LP64_OFF64_LINTFLAGS,
|
|---|
| 1156 | _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
|
|---|
| 1157 | _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
|
|---|
| 1158 | _CS_XBS5_LPBIG_OFFBIG_LIBS,
|
|---|
| 1159 | _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
|
|---|
| 1160 | _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
|
|---|
| 1161 | _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
|
|---|
| 1162 | _CS_POSIX_V6_ILP32_OFF32_LIBS,
|
|---|
| 1163 | _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
|
|---|
| 1164 | _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
|
|---|
| 1165 | _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
|
|---|
| 1166 | _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
|
|---|
| 1167 | _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
|
|---|
| 1168 | _CS_POSIX_V6_LP64_OFF64_CFLAGS,
|
|---|
| 1169 | _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
|
|---|
| 1170 | _CS_POSIX_V6_LP64_OFF64_LIBS,
|
|---|
| 1171 | _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
|
|---|
| 1172 | _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
|
|---|
| 1173 | _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
|
|---|
| 1174 | _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
|
|---|
| 1175 | _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
|
|---|
| 1176 | _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
|
|---|
| 1177 | _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
|
|---|
| 1178 | _CS_POSIX_V7_ILP32_OFF32_LIBS,
|
|---|
| 1179 | _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
|
|---|
| 1180 | _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
|
|---|
| 1181 | _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
|
|---|
| 1182 | _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
|
|---|
| 1183 | _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
|
|---|
| 1184 | _CS_POSIX_V7_LP64_OFF64_CFLAGS,
|
|---|
| 1185 | _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
|
|---|
| 1186 | _CS_POSIX_V7_LP64_OFF64_LIBS,
|
|---|
| 1187 | _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
|
|---|
| 1188 | _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
|
|---|
| 1189 | _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
|
|---|
| 1190 | _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
|
|---|
| 1191 | _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
|
|---|
| 1192 | _CS_V6_ENV,
|
|---|
| 1193 | _CS_V7_ENV
|
|---|
| 1194 | };
|
|---|
| 1195 | extern long int pathconf (const char *__path, int __name)
|
|---|
| 1196 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1197 | extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1198 | extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1199 | extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1200 | extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1201 | extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1202 | extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1203 | extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1204 | extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1205 | extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1206 | extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1207 | extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1208 | extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1209 | extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1210 | extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1211 | extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1212 | extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1213 | extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1214 | extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1215 | extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1216 | extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1217 | extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1218 | extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1219 | extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1220 | extern __pid_t fork (void) __attribute__ ((__nothrow__));
|
|---|
| 1221 | extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1222 | extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1223 | extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
|
|---|
| 1224 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) ;
|
|---|
| 1225 | extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1226 | extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1227 | extern int link (const char *__from, const char *__to)
|
|---|
| 1228 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) ;
|
|---|
| 1229 | extern int linkat (int __fromfd, const char *__from, int __tofd,
|
|---|
| 1230 | const char *__to, int __flags)
|
|---|
| 1231 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) ;
|
|---|
| 1232 | extern int symlink (const char *__from, const char *__to)
|
|---|
| 1233 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) ;
|
|---|
| 1234 | extern ssize_t readlink (const char *__restrict __path,
|
|---|
| 1235 | char *__restrict __buf, size_t __len)
|
|---|
| 1236 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) ;
|
|---|
| 1237 | extern int symlinkat (const char *__from, int __tofd,
|
|---|
| 1238 | const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) ;
|
|---|
| 1239 | extern ssize_t readlinkat (int __fd, const char *__restrict __path,
|
|---|
| 1240 | char *__restrict __buf, size_t __len)
|
|---|
| 1241 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) ;
|
|---|
| 1242 | extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1243 | extern int unlinkat (int __fd, const char *__name, int __flag)
|
|---|
| 1244 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
|
|---|
| 1245 | extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1246 | extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1247 | extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1248 | extern char *getlogin (void);
|
|---|
| 1249 | extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1250 | extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1251 | extern char *optarg;
|
|---|
| 1252 | extern int optind;
|
|---|
| 1253 | extern int opterr;
|
|---|
| 1254 | extern int optopt;
|
|---|
| 1255 | extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
|
|---|
| 1256 | __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1257 | extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1258 | extern int sethostname (const char *__name, size_t __len)
|
|---|
| 1259 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 1260 | extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1261 | extern int getdomainname (char *__name, size_t __len)
|
|---|
| 1262 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 1263 | extern int setdomainname (const char *__name, size_t __len)
|
|---|
| 1264 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 1265 | extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1266 | extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 1267 | extern int profil (unsigned short int *__sample_buffer, size_t __size,
|
|---|
| 1268 | size_t __offset, unsigned int __scale)
|
|---|
| 1269 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1270 | extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1271 | extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1272 | extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1273 | extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1274 | extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1275 | extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 1276 | extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1277 | extern int fsync (int __fd);
|
|---|
| 1278 | extern long int gethostid (void);
|
|---|
| 1279 | extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1280 | extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
|
|---|
| 1281 | extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1282 | extern int truncate (const char *__file, __off_t __length)
|
|---|
| 1283 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
|
|---|
| 1284 | extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1285 | extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1286 | extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1287 | extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1288 | extern int lockf (int __fd, int __cmd, __off_t __len) ;
|
|---|
| 1289 | extern int fdatasync (int __fildes);
|
|---|
| 1290 |
|
|---|
| 1291 | struct sched_param
|
|---|
| 1292 | {
|
|---|
| 1293 | int __sched_priority;
|
|---|
| 1294 | };
|
|---|
| 1295 |
|
|---|
| 1296 |
|
|---|
| 1297 | struct __sched_param
|
|---|
| 1298 | {
|
|---|
| 1299 | int __sched_priority;
|
|---|
| 1300 | };
|
|---|
| 1301 | typedef unsigned long int __cpu_mask;
|
|---|
| 1302 | typedef struct
|
|---|
| 1303 | {
|
|---|
| 1304 | __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
|
|---|
| 1305 | } cpu_set_t;
|
|---|
| 1306 |
|
|---|
| 1307 | extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
|
|---|
| 1308 | __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1309 | extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1310 | extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1311 |
|
|---|
| 1312 |
|
|---|
| 1313 | extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
|
|---|
| 1314 | __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1315 | extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1316 | extern int sched_setscheduler (__pid_t __pid, int __policy,
|
|---|
| 1317 | const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1318 | extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1319 | extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1320 | extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1321 | extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1322 | extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1323 |
|
|---|
| 1324 |
|
|---|
| 1325 |
|
|---|
| 1326 | struct tm
|
|---|
| 1327 | {
|
|---|
| 1328 | int tm_sec;
|
|---|
| 1329 | int tm_min;
|
|---|
| 1330 | int tm_hour;
|
|---|
| 1331 | int tm_mday;
|
|---|
| 1332 | int tm_mon;
|
|---|
| 1333 | int tm_year;
|
|---|
| 1334 | int tm_wday;
|
|---|
| 1335 | int tm_yday;
|
|---|
| 1336 | int tm_isdst;
|
|---|
| 1337 | long int tm_gmtoff;
|
|---|
| 1338 | const char *tm_zone;
|
|---|
| 1339 | };
|
|---|
| 1340 |
|
|---|
| 1341 |
|
|---|
| 1342 | struct itimerspec
|
|---|
| 1343 | {
|
|---|
| 1344 | struct timespec it_interval;
|
|---|
| 1345 | struct timespec it_value;
|
|---|
| 1346 | };
|
|---|
| 1347 | struct sigevent;
|
|---|
| 1348 |
|
|---|
| 1349 | extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1350 | extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1351 | extern double difftime (time_t __time1, time_t __time0)
|
|---|
| 1352 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
|
|---|
| 1353 | extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1354 | extern size_t strftime (char *__restrict __s, size_t __maxsize,
|
|---|
| 1355 | const char *__restrict __format,
|
|---|
| 1356 | const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1357 |
|
|---|
| 1358 | typedef struct __locale_struct
|
|---|
| 1359 | {
|
|---|
| 1360 | struct __locale_data *__locales[13];
|
|---|
| 1361 | const unsigned short int *__ctype_b;
|
|---|
| 1362 | const int *__ctype_tolower;
|
|---|
| 1363 | const int *__ctype_toupper;
|
|---|
| 1364 | const char *__names[13];
|
|---|
| 1365 | } *__locale_t;
|
|---|
| 1366 | typedef __locale_t locale_t;
|
|---|
| 1367 | extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
|
|---|
| 1368 | const char *__restrict __format,
|
|---|
| 1369 | const struct tm *__restrict __tp,
|
|---|
| 1370 | __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1371 |
|
|---|
| 1372 | extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1373 | extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1374 |
|
|---|
| 1375 | extern struct tm *gmtime_r (const time_t *__restrict __timer,
|
|---|
| 1376 | struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1377 | extern struct tm *localtime_r (const time_t *__restrict __timer,
|
|---|
| 1378 | struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1379 |
|
|---|
| 1380 | extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1381 | extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1382 |
|
|---|
| 1383 | extern char *asctime_r (const struct tm *__restrict __tp,
|
|---|
| 1384 | char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1385 | extern char *ctime_r (const time_t *__restrict __timer,
|
|---|
| 1386 | char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1387 | extern char *__tzname[2];
|
|---|
| 1388 | extern int __daylight;
|
|---|
| 1389 | extern long int __timezone;
|
|---|
| 1390 | extern char *tzname[2];
|
|---|
| 1391 | extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1392 | extern int daylight;
|
|---|
| 1393 | extern long int timezone;
|
|---|
| 1394 | extern int stime (const time_t *__when) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1395 | extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1396 | extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1397 | extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
|
|---|
| 1398 | extern int nanosleep (const struct timespec *__requested_time,
|
|---|
| 1399 | struct timespec *__remaining);
|
|---|
| 1400 | extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1401 | extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1402 | extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
|
|---|
| 1403 | __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1404 | extern int clock_nanosleep (clockid_t __clock_id, int __flags,
|
|---|
| 1405 | const struct timespec *__req,
|
|---|
| 1406 | struct timespec *__rem);
|
|---|
| 1407 | extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1408 | extern int timer_create (clockid_t __clock_id,
|
|---|
| 1409 | struct sigevent *__restrict __evp,
|
|---|
| 1410 | timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1411 | extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1412 | extern int timer_settime (timer_t __timerid, int __flags,
|
|---|
| 1413 | const struct itimerspec *__restrict __value,
|
|---|
| 1414 | struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1415 | extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
|
|---|
| 1416 | __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1417 | extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1418 | extern int timespec_get (struct timespec *__ts, int __base)
|
|---|
| 1419 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1420 |
|
|---|
| 1421 | typedef int __jmp_buf[6];
|
|---|
| 1422 | enum
|
|---|
| 1423 | {
|
|---|
| 1424 | PTHREAD_CREATE_JOINABLE,
|
|---|
| 1425 | PTHREAD_CREATE_DETACHED
|
|---|
| 1426 | };
|
|---|
| 1427 | enum
|
|---|
| 1428 | {
|
|---|
| 1429 | PTHREAD_MUTEX_TIMED_NP,
|
|---|
| 1430 | PTHREAD_MUTEX_RECURSIVE_NP,
|
|---|
| 1431 | PTHREAD_MUTEX_ERRORCHECK_NP,
|
|---|
| 1432 | PTHREAD_MUTEX_ADAPTIVE_NP
|
|---|
| 1433 | ,
|
|---|
| 1434 | PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
|
|---|
| 1435 | PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
|
|---|
| 1436 | PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
|
|---|
| 1437 | PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
|
|---|
| 1438 | };
|
|---|
| 1439 | enum
|
|---|
| 1440 | {
|
|---|
| 1441 | PTHREAD_MUTEX_STALLED,
|
|---|
| 1442 | PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
|
|---|
| 1443 | PTHREAD_MUTEX_ROBUST,
|
|---|
| 1444 | PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
|
|---|
| 1445 | };
|
|---|
| 1446 | enum
|
|---|
| 1447 | {
|
|---|
| 1448 | PTHREAD_PRIO_NONE,
|
|---|
| 1449 | PTHREAD_PRIO_INHERIT,
|
|---|
| 1450 | PTHREAD_PRIO_PROTECT
|
|---|
| 1451 | };
|
|---|
| 1452 | enum
|
|---|
| 1453 | {
|
|---|
| 1454 | PTHREAD_RWLOCK_PREFER_READER_NP,
|
|---|
| 1455 | PTHREAD_RWLOCK_PREFER_WRITER_NP,
|
|---|
| 1456 | PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
|
|---|
| 1457 | PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
|
|---|
| 1458 | };
|
|---|
| 1459 | enum
|
|---|
| 1460 | {
|
|---|
| 1461 | PTHREAD_INHERIT_SCHED,
|
|---|
| 1462 | PTHREAD_EXPLICIT_SCHED
|
|---|
| 1463 | };
|
|---|
| 1464 | enum
|
|---|
| 1465 | {
|
|---|
| 1466 | PTHREAD_SCOPE_SYSTEM,
|
|---|
| 1467 | PTHREAD_SCOPE_PROCESS
|
|---|
| 1468 | };
|
|---|
| 1469 | enum
|
|---|
| 1470 | {
|
|---|
| 1471 | PTHREAD_PROCESS_PRIVATE,
|
|---|
| 1472 | PTHREAD_PROCESS_SHARED
|
|---|
| 1473 | };
|
|---|
| 1474 | struct _pthread_cleanup_buffer
|
|---|
| 1475 | {
|
|---|
| 1476 | void (*__routine) (void *);
|
|---|
| 1477 | void *__arg;
|
|---|
| 1478 | int __canceltype;
|
|---|
| 1479 | struct _pthread_cleanup_buffer *__prev;
|
|---|
| 1480 | };
|
|---|
| 1481 | enum
|
|---|
| 1482 | {
|
|---|
| 1483 | PTHREAD_CANCEL_ENABLE,
|
|---|
| 1484 | PTHREAD_CANCEL_DISABLE
|
|---|
| 1485 | };
|
|---|
| 1486 | enum
|
|---|
| 1487 | {
|
|---|
| 1488 | PTHREAD_CANCEL_DEFERRED,
|
|---|
| 1489 | PTHREAD_CANCEL_ASYNCHRONOUS
|
|---|
| 1490 | };
|
|---|
| 1491 |
|
|---|
| 1492 | extern int pthread_create (pthread_t *__restrict __newthread,
|
|---|
| 1493 | const pthread_attr_t *__restrict __attr,
|
|---|
| 1494 | void *(*__start_routine) (void *),
|
|---|
| 1495 | void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
|
|---|
| 1496 | extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
|
|---|
| 1497 | extern int pthread_join (pthread_t __th, void **__thread_return);
|
|---|
| 1498 | extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1499 | extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
|
|---|
| 1500 | extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
|
|---|
| 1501 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
|
|---|
| 1502 | extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1503 | extern int pthread_attr_destroy (pthread_attr_t *__attr)
|
|---|
| 1504 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1505 | extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
|
|---|
| 1506 | int *__detachstate)
|
|---|
| 1507 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1508 | extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
|
|---|
| 1509 | int __detachstate)
|
|---|
| 1510 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1511 | extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
|
|---|
| 1512 | size_t *__guardsize)
|
|---|
| 1513 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1514 | extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
|
|---|
| 1515 | size_t __guardsize)
|
|---|
| 1516 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1517 | extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
|
|---|
| 1518 | struct sched_param *__restrict __param)
|
|---|
| 1519 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1520 | extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
|
|---|
| 1521 | const struct sched_param *__restrict
|
|---|
| 1522 | __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1523 | extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
|
|---|
| 1524 | __attr, int *__restrict __policy)
|
|---|
| 1525 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1526 | extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
|
|---|
| 1527 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1528 | extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
|
|---|
| 1529 | __attr, int *__restrict __inherit)
|
|---|
| 1530 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1531 | extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
|
|---|
| 1532 | int __inherit)
|
|---|
| 1533 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1534 | extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
|
|---|
| 1535 | int *__restrict __scope)
|
|---|
| 1536 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1537 | extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
|
|---|
| 1538 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1539 | extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
|
|---|
| 1540 | __attr, void **__restrict __stackaddr)
|
|---|
| 1541 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
|
|---|
| 1542 | extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
|
|---|
| 1543 | void *__stackaddr)
|
|---|
| 1544 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
|
|---|
| 1545 | extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
|
|---|
| 1546 | __attr, size_t *__restrict __stacksize)
|
|---|
| 1547 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1548 | extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
|
|---|
| 1549 | size_t __stacksize)
|
|---|
| 1550 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1551 | extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
|
|---|
| 1552 | void **__restrict __stackaddr,
|
|---|
| 1553 | size_t *__restrict __stacksize)
|
|---|
| 1554 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
|
|---|
| 1555 | extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
|
|---|
| 1556 | size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1557 | extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
|
|---|
| 1558 | const struct sched_param *__param)
|
|---|
| 1559 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
|
|---|
| 1560 | extern int pthread_getschedparam (pthread_t __target_thread,
|
|---|
| 1561 | int *__restrict __policy,
|
|---|
| 1562 | struct sched_param *__restrict __param)
|
|---|
| 1563 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
|
|---|
| 1564 | extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
|
|---|
| 1565 | __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1566 | extern int pthread_once (pthread_once_t *__once_control,
|
|---|
| 1567 | void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1568 | extern int pthread_setcancelstate (int __state, int *__oldstate);
|
|---|
| 1569 | extern int pthread_setcanceltype (int __type, int *__oldtype);
|
|---|
| 1570 | extern int pthread_cancel (pthread_t __th);
|
|---|
| 1571 | extern void pthread_testcancel (void);
|
|---|
| 1572 | typedef struct
|
|---|
| 1573 | {
|
|---|
| 1574 | struct
|
|---|
| 1575 | {
|
|---|
| 1576 | __jmp_buf __cancel_jmp_buf;
|
|---|
| 1577 | int __mask_was_saved;
|
|---|
| 1578 | } __cancel_jmp_buf[1];
|
|---|
| 1579 | void *__pad[4];
|
|---|
| 1580 | } __pthread_unwind_buf_t __attribute__ ((__aligned__));
|
|---|
| 1581 | struct __pthread_cleanup_frame
|
|---|
| 1582 | {
|
|---|
| 1583 | void (*__cancel_routine) (void *);
|
|---|
| 1584 | void *__cancel_arg;
|
|---|
| 1585 | int __do_it;
|
|---|
| 1586 | int __cancel_type;
|
|---|
| 1587 | };
|
|---|
| 1588 | extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
|
|---|
| 1589 | __attribute__ ((__regparm__ (1)));
|
|---|
| 1590 | extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
|
|---|
| 1591 | __attribute__ ((__regparm__ (1)));
|
|---|
| 1592 | extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
|
|---|
| 1593 | __attribute__ ((__regparm__ (1))) __attribute__ ((__noreturn__))
|
|---|
| 1594 | __attribute__ ((__weak__))
|
|---|
| 1595 | ;
|
|---|
| 1596 | struct __jmp_buf_tag;
|
|---|
| 1597 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
|
|---|
| 1598 | extern int pthread_mutex_init (pthread_mutex_t *__mutex,
|
|---|
| 1599 | const pthread_mutexattr_t *__mutexattr)
|
|---|
| 1600 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1601 | extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
|
|---|
| 1602 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1603 | extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
|
|---|
| 1604 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1605 | extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
|
|---|
| 1606 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1607 | extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
|
|---|
| 1608 | const struct timespec *__restrict
|
|---|
| 1609 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1610 | extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
|
|---|
| 1611 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1612 | extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
|
|---|
| 1613 | __restrict __mutex,
|
|---|
| 1614 | int *__restrict __prioceiling)
|
|---|
| 1615 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1616 | extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
|
|---|
| 1617 | int __prioceiling,
|
|---|
| 1618 | int *__restrict __old_ceiling)
|
|---|
| 1619 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
|
|---|
| 1620 | extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
|
|---|
| 1621 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1622 | extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
|
|---|
| 1623 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1624 | extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
|
|---|
| 1625 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1626 | extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
|
|---|
| 1627 | __restrict __attr,
|
|---|
| 1628 | int *__restrict __pshared)
|
|---|
| 1629 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1630 | extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
|
|---|
| 1631 | int __pshared)
|
|---|
| 1632 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1633 | extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
|
|---|
| 1634 | __attr, int *__restrict __kind)
|
|---|
| 1635 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1636 | extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
|
|---|
| 1637 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1638 | extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
|
|---|
| 1639 | __restrict __attr,
|
|---|
| 1640 | int *__restrict __protocol)
|
|---|
| 1641 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1642 | extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
|
|---|
| 1643 | int __protocol)
|
|---|
| 1644 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1645 | extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
|
|---|
| 1646 | __restrict __attr,
|
|---|
| 1647 | int *__restrict __prioceiling)
|
|---|
| 1648 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1649 | extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
|
|---|
| 1650 | int __prioceiling)
|
|---|
| 1651 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1652 | extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
|
|---|
| 1653 | int *__robustness)
|
|---|
| 1654 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1655 | extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
|
|---|
| 1656 | int __robustness)
|
|---|
| 1657 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1658 | extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
|
|---|
| 1659 | const pthread_rwlockattr_t *__restrict
|
|---|
| 1660 | __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1661 | extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
|
|---|
| 1662 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1663 | extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
|
|---|
| 1664 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1665 | extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
|
|---|
| 1666 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1667 | extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
|
|---|
| 1668 | const struct timespec *__restrict
|
|---|
| 1669 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1670 | extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
|
|---|
| 1671 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1672 | extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
|
|---|
| 1673 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1674 | extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
|
|---|
| 1675 | const struct timespec *__restrict
|
|---|
| 1676 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1677 | extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
|
|---|
| 1678 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1679 | extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
|
|---|
| 1680 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1681 | extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
|
|---|
| 1682 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1683 | extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
|
|---|
| 1684 | __restrict __attr,
|
|---|
| 1685 | int *__restrict __pshared)
|
|---|
| 1686 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1687 | extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
|
|---|
| 1688 | int __pshared)
|
|---|
| 1689 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1690 | extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
|
|---|
| 1691 | __restrict __attr,
|
|---|
| 1692 | int *__restrict __pref)
|
|---|
| 1693 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1694 | extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
|
|---|
| 1695 | int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1696 | extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
|
|---|
| 1697 | const pthread_condattr_t *__restrict __cond_attr)
|
|---|
| 1698 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1699 | extern int pthread_cond_destroy (pthread_cond_t *__cond)
|
|---|
| 1700 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1701 | extern int pthread_cond_signal (pthread_cond_t *__cond)
|
|---|
| 1702 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1703 | extern int pthread_cond_broadcast (pthread_cond_t *__cond)
|
|---|
| 1704 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1705 | extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
|
|---|
| 1706 | pthread_mutex_t *__restrict __mutex)
|
|---|
| 1707 | __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1708 | extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
|
|---|
| 1709 | pthread_mutex_t *__restrict __mutex,
|
|---|
| 1710 | const struct timespec *__restrict __abstime)
|
|---|
| 1711 | __attribute__ ((__nonnull__ (1, 2, 3)));
|
|---|
| 1712 | extern int pthread_condattr_init (pthread_condattr_t *__attr)
|
|---|
| 1713 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1714 | extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
|
|---|
| 1715 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1716 | extern int pthread_condattr_getpshared (const pthread_condattr_t *
|
|---|
| 1717 | __restrict __attr,
|
|---|
| 1718 | int *__restrict __pshared)
|
|---|
| 1719 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1720 | extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
|
|---|
| 1721 | int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1722 | extern int pthread_condattr_getclock (const pthread_condattr_t *
|
|---|
| 1723 | __restrict __attr,
|
|---|
| 1724 | __clockid_t *__restrict __clock_id)
|
|---|
| 1725 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1726 | extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
|
|---|
| 1727 | __clockid_t __clock_id)
|
|---|
| 1728 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1729 | extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
|
|---|
| 1730 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1731 | extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
|
|---|
| 1732 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1733 | extern int pthread_spin_lock (pthread_spinlock_t *__lock)
|
|---|
| 1734 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1735 | extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
|
|---|
| 1736 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1737 | extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
|
|---|
| 1738 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1739 | extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
|
|---|
| 1740 | const pthread_barrierattr_t *__restrict
|
|---|
| 1741 | __attr, unsigned int __count)
|
|---|
| 1742 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1743 | extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
|
|---|
| 1744 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1745 | extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
|
|---|
| 1746 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1747 | extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
|
|---|
| 1748 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1749 | extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
|
|---|
| 1750 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1751 | extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
|
|---|
| 1752 | __restrict __attr,
|
|---|
| 1753 | int *__restrict __pshared)
|
|---|
| 1754 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
|
|---|
| 1755 | extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
|
|---|
| 1756 | int __pshared)
|
|---|
| 1757 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1758 | extern int pthread_key_create (pthread_key_t *__key,
|
|---|
| 1759 | void (*__destr_function) (void *))
|
|---|
| 1760 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
|
|---|
| 1761 | extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1762 | extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1763 | extern int pthread_setspecific (pthread_key_t __key,
|
|---|
| 1764 | const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ;
|
|---|
| 1765 | extern int pthread_getcpuclockid (pthread_t __thread_id,
|
|---|
| 1766 | __clockid_t *__clock_id)
|
|---|
| 1767 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
|
|---|
| 1768 | extern int pthread_atfork (void (*__prepare) (void),
|
|---|
| 1769 | void (*__parent) (void),
|
|---|
| 1770 | void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
|
|---|
| 1771 |
|
|---|
| 1772 | typedef struct SafeStackItem
|
|---|
| 1773 | {
|
|---|
| 1774 | volatile int Value;
|
|---|
| 1775 | int Next;
|
|---|
| 1776 | } SafeStackItem;
|
|---|
| 1777 | typedef struct SafeStack
|
|---|
| 1778 | {
|
|---|
| 1779 | SafeStackItem array[3];
|
|---|
| 1780 | int head;
|
|---|
| 1781 | int count;
|
|---|
| 1782 | } SafeStack;
|
|---|
| 1783 | pthread_t threads[3];
|
|---|
| 1784 | SafeStack stack;
|
|---|
| 1785 | void atomic_store(int *obj, int v)
|
|---|
| 1786 | {
|
|---|
| 1787 | __VERIFIER_atomic_begin();
|
|---|
| 1788 | *obj = v;
|
|---|
| 1789 | __VERIFIER_atomic_end();
|
|---|
| 1790 | }
|
|---|
| 1791 | int atomic_load(int *obj)
|
|---|
| 1792 | {
|
|---|
| 1793 | return *obj;
|
|---|
| 1794 | }
|
|---|
| 1795 | int atomic_exchange(int *obj, int v)
|
|---|
| 1796 | {
|
|---|
| 1797 | __VERIFIER_atomic_begin();
|
|---|
| 1798 | int t = *obj;
|
|---|
| 1799 | *obj = v;
|
|---|
| 1800 | __VERIFIER_atomic_end();
|
|---|
| 1801 | return t;
|
|---|
| 1802 | }
|
|---|
| 1803 | _Bool atomic_compare_and_exchange(int *obj, int *expected, int desired)
|
|---|
| 1804 | {
|
|---|
| 1805 | _Bool ret = 0;
|
|---|
| 1806 | __VERIFIER_atomic_begin();
|
|---|
| 1807 | if(*obj == *expected)
|
|---|
| 1808 | {
|
|---|
| 1809 | *obj = desired;
|
|---|
| 1810 | ret = 1;
|
|---|
| 1811 | }
|
|---|
| 1812 | else
|
|---|
| 1813 | {
|
|---|
| 1814 | *expected = *obj;
|
|---|
| 1815 | ret = 0;
|
|---|
| 1816 | }
|
|---|
| 1817 | __VERIFIER_atomic_end();
|
|---|
| 1818 | return ret;
|
|---|
| 1819 | }
|
|---|
| 1820 | int atomic_fetch_add(int * obj, int v)
|
|---|
| 1821 | {
|
|---|
| 1822 | __VERIFIER_atomic_begin();
|
|---|
| 1823 | int old = *obj;
|
|---|
| 1824 | *obj = *obj + v;
|
|---|
| 1825 | __VERIFIER_atomic_end();
|
|---|
| 1826 | return old;
|
|---|
| 1827 | }
|
|---|
| 1828 | int atomic_fetch_sub(int * obj, int v)
|
|---|
| 1829 | {
|
|---|
| 1830 | __VERIFIER_atomic_begin();
|
|---|
| 1831 | int old = *obj;
|
|---|
| 1832 | *obj = *obj - v;
|
|---|
| 1833 | __VERIFIER_atomic_end();
|
|---|
| 1834 | return old;
|
|---|
| 1835 | }
|
|---|
| 1836 | void Init(int pushCount)
|
|---|
| 1837 | {
|
|---|
| 1838 | int i;
|
|---|
| 1839 | atomic_store(&stack.count, pushCount);
|
|---|
| 1840 | atomic_store(&stack.head, 0);
|
|---|
| 1841 | for (i = 0; i < pushCount - 1; i++)
|
|---|
| 1842 | {
|
|---|
| 1843 | atomic_store(&stack.array[i].Next, i + 1);
|
|---|
| 1844 | }
|
|---|
| 1845 | atomic_store(&stack.array[pushCount - 1].Next, -1);
|
|---|
| 1846 | }
|
|---|
| 1847 | int Pop(void)
|
|---|
| 1848 | {
|
|---|
| 1849 | while (atomic_load(&stack.count) > 1)
|
|---|
| 1850 | {
|
|---|
| 1851 | int head1 = atomic_load(&stack.head);
|
|---|
| 1852 | int next1 = atomic_exchange(&stack.array[head1].Next, -1);
|
|---|
| 1853 | if (next1 >= 0)
|
|---|
| 1854 | {
|
|---|
| 1855 | int head2 = head1;
|
|---|
| 1856 | if (atomic_compare_and_exchange(&stack.head, &head2, next1))
|
|---|
| 1857 | {
|
|---|
| 1858 | atomic_fetch_sub(&stack.count, 1);
|
|---|
| 1859 | return head1;
|
|---|
| 1860 | }
|
|---|
| 1861 | else
|
|---|
| 1862 | {
|
|---|
| 1863 | atomic_exchange(&stack.array[head1].Next, next1);
|
|---|
| 1864 | }
|
|---|
| 1865 | }
|
|---|
| 1866 | }
|
|---|
| 1867 | return -1;
|
|---|
| 1868 | }
|
|---|
| 1869 | void Push(int index)
|
|---|
| 1870 | {
|
|---|
| 1871 | int head1 = atomic_load(&stack.head);
|
|---|
| 1872 | do
|
|---|
| 1873 | {
|
|---|
| 1874 | atomic_store(&stack.array[index].Next, head1);
|
|---|
| 1875 | } while (!(atomic_compare_and_exchange(&stack.head, &head1, index)));
|
|---|
| 1876 | atomic_fetch_add(&stack.count, 1);
|
|---|
| 1877 | }
|
|---|
| 1878 | void* thread(void* arg)
|
|---|
| 1879 | {
|
|---|
| 1880 | size_t i;
|
|---|
| 1881 | int idx = (int)(size_t)arg;
|
|---|
| 1882 | for (i = 0; i < 2; i++)
|
|---|
| 1883 | {
|
|---|
| 1884 | int elem;
|
|---|
| 1885 | for (;;)
|
|---|
| 1886 | {
|
|---|
| 1887 | elem = Pop();
|
|---|
| 1888 | if (elem >= 0)
|
|---|
| 1889 | break;
|
|---|
| 1890 | }
|
|---|
| 1891 | stack.array[elem].Value = idx;
|
|---|
| 1892 | if(!(stack.array[elem].Value == idx)) __VERIFIER_error();
|
|---|
| 1893 | Push(elem);
|
|---|
| 1894 | }
|
|---|
| 1895 | return ((void *)0);
|
|---|
| 1896 | }
|
|---|
| 1897 | int main(void)
|
|---|
| 1898 | {
|
|---|
| 1899 | int i;
|
|---|
| 1900 | Init(3);
|
|---|
| 1901 | for (i = 0; i < 3; ++i) {
|
|---|
| 1902 | pthread_create(&threads[i], ((void *)0), thread, (void*) i);
|
|---|
| 1903 | }
|
|---|
| 1904 | for (i = 0; i < 3; ++i) {
|
|---|
| 1905 | pthread_join(threads[i], ((void *)0));
|
|---|
| 1906 | }
|
|---|
| 1907 | return 0;
|
|---|
| 1908 | }
|
|---|