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 flag1 = 0, flag2 = 0;
634int turn;
635int x;
636void *thr1() {
637 flag1 = 1;
638 while (flag2 >= 1) {
639 if (turn != 0) {
640 flag1 = 0;
641 while (turn != 0) {};
642 flag1 = 1;
643 }
644 }
645 x = 0;
646 if (!(x<=0)) ERROR: goto ERROR;;
647 turn = 1;
648 flag1 = 0;
649}
650void *thr2() {
651 flag2 = 1;
652 while (flag1 >= 1) {
653 if (turn != 1) {
654 flag2 = 0;
655 while (turn != 1) {};
656 flag2 = 1;