1typedef unsigned char __u_char;
2typedef unsigned short int __u_short;
3typedef unsigned int __u_int;
4typedef unsigned long int __u_long;
5typedef signed char __int8_t;
6typedef unsigned char __uint8_t;
7typedef signed short int __int16_t;
8typedef unsigned short int __uint16_t;
9typedef signed int __int32_t;
10typedef unsigned int __uint32_t;
11typedef signed long int __int64_t;
12typedef unsigned long int __uint64_t;
13typedef long int __quad_t;
14typedef unsigned long int __u_quad_t;
15typedef unsigned long int __dev_t;
16typedef unsigned int __uid_t;
17typedef unsigned int __gid_t;
18typedef unsigned long int __ino_t;
19typedef unsigned long int __ino64_t;
20typedef unsigned int __mode_t;
21typedef unsigned long int __nlink_t;
22typedef long int __off_t;
23typedef long int __off64_t;
24typedef int __pid_t;
25typedef struct { int __val[2]; } __fsid_t;
26typedef long int __clock_t;
27typedef unsigned long int __rlim_t;
28typedef unsigned long int __rlim64_t;
29typedef unsigned int __id_t;
30typedef long int __time_t;
31typedef unsigned int __useconds_t;
32typedef long int __suseconds_t;
33typedef int __daddr_t;
34typedef long int __swblk_t;
35typedef int __key_t;
36typedef int __clockid_t;
37typedef void * __timer_t;
38typedef long int __blksize_t;
39typedef long int __blkcnt_t;
40typedef long int __blkcnt64_t;
41typedef unsigned long int __fsblkcnt_t;
42typedef unsigned long int __fsblkcnt64_t;
43typedef unsigned long int __fsfilcnt_t;
44typedef unsigned long int __fsfilcnt64_t;
45typedef long int __ssize_t;
46typedef __off64_t __loff_t;
47typedef __quad_t *__qaddr_t;
48typedef char *__caddr_t;
49typedef long int __intptr_t;
50typedef unsigned int __socklen_t;
51typedef long unsigned int size_t;
52
53typedef __time_t time_t;
54
55
56struct timespec
57 {
58 __time_t tv_sec;
59 long int tv_nsec;
60 };
61typedef __pid_t pid_t;
62struct sched_param
63 {
64 int __sched_priority;
65 };
66
67
68struct __sched_param
69 {
70 int __sched_priority;
71 };
72typedef unsigned long int __cpu_mask;
73typedef struct
74{
75 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
76} cpu_set_t;
77
78extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
79 __attribute__ ((__nothrow__ , __leaf__));
80extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) ;
81extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
82
83
84extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
85 __attribute__ ((__nothrow__ , __leaf__));
86extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
87extern int sched_setscheduler (__pid_t __pid, int __policy,
88 __const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
89extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
90extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
91extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
92extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
93extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
94
95
96
97typedef __clock_t clock_t;
98
99
100typedef __clockid_t clockid_t;
101
102
103
104typedef __timer_t timer_t;
105
106struct tm
107{
108 int tm_sec;
109 int tm_min;
110 int tm_hour;
111 int tm_mday;
112 int tm_mon;
113 int tm_year;
114 int tm_wday;
115 int tm_yday;
116 int tm_isdst;
117 long int tm_gmtoff;
118 __const char *tm_zone;
119};
120
121
122struct itimerspec
123 {
124 struct timespec it_interval;
125 struct timespec it_value;
126 };
127struct sigevent;
128
129extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
130extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
131extern double difftime (time_t __time1, time_t __time0)
132 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
133extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
134extern size_t strftime (char *__restrict __s, size_t __maxsize,
135 __const char *__restrict __format,
136 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
137
138typedef struct __locale_struct
139{
140 struct __locale_data *__locales[13];
141 const unsigned short int *__ctype_b;
142 const int *__ctype_tolower;
143 const int *__ctype_toupper;
144 const char *__names[13];
145} *__locale_t;
146typedef __locale_t locale_t;
147extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
148 __const char *__restrict __format,
149 __const struct tm *__restrict __tp,
150 __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
151
152extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
153extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
154
155extern struct tm *gmtime_r (__const time_t *__restrict __timer,
156 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
157extern struct tm *localtime_r (__const time_t *__restrict __timer,
158 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
159
160extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
161extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
162
163extern char *asctime_r (__const struct tm *__restrict __tp,
164 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
165extern char *ctime_r (__const time_t *__restrict __timer,
166 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
167extern char *__tzname[2];
168extern int __daylight;
169extern long int __timezone;
170extern char *tzname[2];
171extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
172extern int daylight;
173extern long int timezone;
174extern int stime (__const time_t *__when) __attribute__ ((__nothrow__ , __leaf__));
175extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
176extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
177extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
178extern int nanosleep (__const struct timespec *__requested_time,
179 struct timespec *__remaining);
180extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
181extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
182extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
183 __attribute__ ((__nothrow__ , __leaf__));
184extern int clock_nanosleep (clockid_t __clock_id, int __flags,
185 __const struct timespec *__req,
186 struct timespec *__rem);
187extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
188extern int timer_create (clockid_t __clock_id,
189 struct sigevent *__restrict __evp,
190 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
191extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
192extern int timer_settime (timer_t __timerid, int __flags,
193 __const struct itimerspec *__restrict __value,
194 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
195extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
196 __attribute__ ((__nothrow__ , __leaf__));
197extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
198
199typedef unsigned long int pthread_t;
200typedef union
201{
202 char __size[56];
203 long int __align;
204} pthread_attr_t;
205typedef struct __pthread_internal_list
206{
207 struct __pthread_internal_list *__prev;
208 struct __pthread_internal_list *__next;
209} __pthread_list_t;
210typedef union
211{
212 struct __pthread_mutex_s
213 {
214 int __lock;
215 unsigned int __count;
216 int __owner;
217 unsigned int __nusers;
218 int __kind;
219 int __spins;
220 __pthread_list_t __list;
221 } __data;
222 char __size[40];
223 long int __align;
224} pthread_mutex_t;
225typedef union
226{
227 char __size[4];
228 int __align;
229} pthread_mutexattr_t;
230typedef union
231{
232 struct
233 {
234 int __lock;
235 unsigned int __futex;
236 __extension__ unsigned long long int __total_seq;
237 __extension__ unsigned long long int __wakeup_seq;
238 __extension__ unsigned long long int __woken_seq;
239 void *__mutex;
240 unsigned int __nwaiters;
241 unsigned int __broadcast_seq;
242 } __data;
243 char __size[48];
244 __extension__ long long int __align;
245} pthread_cond_t;
246typedef union
247{
248 char __size[4];
249 int __align;
250} pthread_condattr_t;
251typedef unsigned int pthread_key_t;
252typedef int pthread_once_t;
253typedef union
254{
255 struct
256 {
257 int __lock;
258 unsigned int __nr_readers;
259 unsigned int __readers_wakeup;
260 unsigned int __writer_wakeup;
261 unsigned int __nr_readers_queued;
262 unsigned int __nr_writers_queued;
263 int __writer;
264 int __shared;
265 unsigned long int __pad1;
266 unsigned long int __pad2;
267 unsigned int __flags;
268 } __data;
269 char __size[56];
270 long int __align;
271} pthread_rwlock_t;
272typedef union
273{
274 char __size[8];
275 long int __align;
276} pthread_rwlockattr_t;
277typedef volatile int pthread_spinlock_t;
278typedef union
279{
280 char __size[32];
281 long int __align;
282} pthread_barrier_t;
283typedef union
284{
285 char __size[4];
286 int __align;
287} pthread_barrierattr_t;
288typedef long int __jmp_buf[8];
289enum
290{
291 PTHREAD_CREATE_JOINABLE,
292 PTHREAD_CREATE_DETACHED
293};
294enum
295{
296 PTHREAD_MUTEX_TIMED_NP,
297 PTHREAD_MUTEX_RECURSIVE_NP,
298 PTHREAD_MUTEX_ERRORCHECK_NP,
299 PTHREAD_MUTEX_ADAPTIVE_NP
300 ,
301 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
302 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
303 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
304 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
305};
306enum
307{
308 PTHREAD_MUTEX_STALLED,
309 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
310 PTHREAD_MUTEX_ROBUST,
311 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
312};
313enum
314{
315 PTHREAD_RWLOCK_PREFER_READER_NP,
316 PTHREAD_RWLOCK_PREFER_WRITER_NP,
317 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
318 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
319};
320enum
321{
322 PTHREAD_INHERIT_SCHED,
323 PTHREAD_EXPLICIT_SCHED
324};
325enum
326{
327 PTHREAD_SCOPE_SYSTEM,
328 PTHREAD_SCOPE_PROCESS
329};
330enum
331{
332 PTHREAD_PROCESS_PRIVATE,
333 PTHREAD_PROCESS_SHARED
334};
335struct _pthread_cleanup_buffer
336{
337 void (*__routine) (void *);
338 void *__arg;
339 int __canceltype;
340 struct _pthread_cleanup_buffer *__prev;
341};
342enum
343{
344 PTHREAD_CANCEL_ENABLE,
345 PTHREAD_CANCEL_DISABLE
346};
347enum
348{
349 PTHREAD_CANCEL_DEFERRED,
350 PTHREAD_CANCEL_ASYNCHRONOUS
351};
352
353extern int pthread_create (pthread_t *__restrict __newthread,
354 __const pthread_attr_t *__restrict __attr,
355 void *(*__start_routine) (void *),
356 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
357extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
358extern int pthread_join (pthread_t __th, void **__thread_return);
359extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
360extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
361extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__ , __leaf__));
362extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
363extern int pthread_attr_destroy (pthread_attr_t *__attr)
364 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
365extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
366 int *__detachstate)
367 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
368extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
369 int __detachstate)
370 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
371extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
372 size_t *__guardsize)
373 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
374extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
375 size_t __guardsize)
376 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
377extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
378 __attr,
379 struct sched_param *__restrict __param)
380 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
381extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
382 __const struct sched_param *__restrict
383 __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
384extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
385 __attr, int *__restrict __policy)
386 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
387extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
388 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
389extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
390 __attr, int *__restrict __inherit)
391 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
392extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
393 int __inherit)
394 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
395extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
396 int *__restrict __scope)
397 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
398extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
399 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
400extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
401 __attr, void **__restrict __stackaddr)
402 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
403extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
404 void *__stackaddr)
405 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
406extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
407 __attr, size_t *__restrict __stacksize)
408 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
409extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
410 size_t __stacksize)
411 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
412extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
413 void **__restrict __stackaddr,
414 size_t *__restrict __stacksize)
415 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
416extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
417 size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
418extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
419 __const struct sched_param *__param)
420 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
421extern int pthread_getschedparam (pthread_t __target_thread,
422 int *__restrict __policy,
423 struct sched_param *__restrict __param)
424 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
425extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
426 __attribute__ ((__nothrow__ , __leaf__));
427extern int pthread_once (pthread_once_t *__once_control,
428 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
429extern int pthread_setcancelstate (int __state, int *__oldstate);
430extern int pthread_setcanceltype (int __type, int *__oldtype);
431extern int pthread_cancel (pthread_t __th);
432extern void pthread_testcancel (void);
433typedef struct
434{
435 struct
436 {
437 __jmp_buf __cancel_jmp_buf;
438 int __mask_was_saved;
439 } __cancel_jmp_buf[1];
440 void *__pad[4];
441} __pthread_unwind_buf_t __attribute__ ((__aligned__));
442struct __pthread_cleanup_frame
443{
444 void (*__cancel_routine) (void *);
445 void *__cancel_arg;
446 int __do_it;
447 int __cancel_type;
448};
449extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
450 ;
451extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
452 ;
453extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
454 __attribute__ ((__noreturn__))
455 __attribute__ ((__weak__))
456 ;
457struct __jmp_buf_tag;
458extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__ , __leaf__));
459extern int pthread_mutex_init (pthread_mutex_t *__mutex,
460 __const pthread_mutexattr_t *__mutexattr)
461 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
462extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
463 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
464extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
465 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
466extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
467 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
468extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
469 __const struct timespec *__restrict
470 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
471extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
472 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
473extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
474 __restrict __mutex,
475 int *__restrict __prioceiling)
476 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
477extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
478 int __prioceiling,
479 int *__restrict __old_ceiling)
480 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
481extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
482 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
483extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
484 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
485extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
486 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
487extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
488 __restrict __attr,
489 int *__restrict __pshared)
490 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
491extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
492 int __pshared)
493 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
494extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
495 __attr, int *__restrict __kind)
496 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
497extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
498 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
499extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
500 __restrict __attr,
501 int *__restrict __protocol)
502 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
503extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
504 int __protocol)
505 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
506extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
507 __restrict __attr,
508 int *__restrict __prioceiling)
509 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
510extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
511 int __prioceiling)
512 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
513extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
514 int *__robustness)
515 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
516extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
517 int __robustness)
518 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
519extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
520 __const pthread_rwlockattr_t *__restrict
521 __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
522extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
523 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
524extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
525 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
526extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
527 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
528extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
529 __const struct timespec *__restrict
530 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
531extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
532 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
533extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
534 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
535extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
536 __const struct timespec *__restrict
537 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
538extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
539 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
540extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
541 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
542extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
543 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
544extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
545 __restrict __attr,
546 int *__restrict __pshared)
547 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
548extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
549 int __pshared)
550 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
551extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
552 __restrict __attr,
553 int *__restrict __pref)
554 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
555extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
556 int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
557extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
558 __const pthread_condattr_t *__restrict
559 __cond_attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
560extern int pthread_cond_destroy (pthread_cond_t *__cond)
561 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
562extern int pthread_cond_signal (pthread_cond_t *__cond)
563 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
564extern int pthread_cond_broadcast (pthread_cond_t *__cond)
565 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
566extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
567 pthread_mutex_t *__restrict __mutex)
568 __attribute__ ((__nonnull__ (1, 2)));
569extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
570 pthread_mutex_t *__restrict __mutex,
571 __const struct timespec *__restrict
572 __abstime) __attribute__ ((__nonnull__ (1, 2, 3)));
573extern int pthread_condattr_init (pthread_condattr_t *__attr)
574 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
575extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
576 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
577extern int pthread_condattr_getpshared (__const pthread_condattr_t *
578 __restrict __attr,
579 int *__restrict __pshared)
580 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
581extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
582 int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
583extern int pthread_condattr_getclock (__const pthread_condattr_t *
584 __restrict __attr,
585 __clockid_t *__restrict __clock_id)
586 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
587extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
588 __clockid_t __clock_id)
589 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
590extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
591 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
592extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
593 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
594extern int pthread_spin_lock (pthread_spinlock_t *__lock)
595 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
596extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
597 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
598extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
599 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
600extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
601 __const pthread_barrierattr_t *__restrict
602 __attr, unsigned int __count)
603 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
604extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
605 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
606extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
607 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
608extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
609 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
610extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
611 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
612extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
613 __restrict __attr,
614 int *__restrict __pshared)
615 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
616extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
617 int __pshared)
618 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
619extern int pthread_key_create (pthread_key_t *__key,
620 void (*__destr_function) (void *))
621 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
622extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
623extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
624extern int pthread_setspecific (pthread_key_t __key,
625 __const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ;
626extern int pthread_getcpuclockid (pthread_t __thread_id,
627 __clockid_t *__clock_id)
628 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
629extern int pthread_atfork (void (*__prepare) (void),
630 void (*__parent) (void),
631 void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
632
633int i=1, j=1;
634void *
635t1(void* arg)
636{
637 int k = 0;
638 for (k = 0; k < 5; k++)
639 i+=j;
640 pthread_exit(((void *)0));
641}
642void *
643t2(void* arg)
644{
645 int k = 0;
646 for (k = 0; k < 5; k++)
647 j+=i;
648 pthread_exit(((void *)0));
649}
650int
651main(int argc, char **argv)
652{
653 pthread_t id1, id2;
654 pthread_create(&id1, ((void *)0), t1, ((void *)0));
655 pthread_create(&id2, ((void *)0), t2, ((void *)0));
656 if (i > 144 || j > 144) {
657 goto ERROR;
658 ERROR:
659 ;
660 }
661 return 0;
662}