af_llc.c (62910554656cdcd6b6f84a5154c4155aae4ca231) | af_llc.c (aa395145165cb06a0d0885221bbe0ce4a564391d) |
---|---|
1/* 2 * af_llc.c - LLC User Interface SAPs 3 * Description: 4 * Functions in this module are implementation of socket based llc 5 * communications for the Linux operating system. Support of llc class 6 * one and class two is provided via SOCK_DGRAM and SOCK_STREAM 7 * respectively. 8 * --- 522 unchanged lines hidden (view full) --- 531} 532 533static int llc_ui_wait_for_disc(struct sock *sk, long timeout) 534{ 535 DEFINE_WAIT(wait); 536 int rc = 0; 537 538 while (1) { | 1/* 2 * af_llc.c - LLC User Interface SAPs 3 * Description: 4 * Functions in this module are implementation of socket based llc 5 * communications for the Linux operating system. Support of llc class 6 * one and class two is provided via SOCK_DGRAM and SOCK_STREAM 7 * respectively. 8 * --- 522 unchanged lines hidden (view full) --- 531} 532 533static int llc_ui_wait_for_disc(struct sock *sk, long timeout) 534{ 535 DEFINE_WAIT(wait); 536 int rc = 0; 537 538 while (1) { |
539 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 539 prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
540 if (sk_wait_event(sk, &timeout, sk->sk_state == TCP_CLOSE)) 541 break; 542 rc = -ERESTARTSYS; 543 if (signal_pending(current)) 544 break; 545 rc = -EAGAIN; 546 if (!timeout) 547 break; 548 rc = 0; 549 } | 540 if (sk_wait_event(sk, &timeout, sk->sk_state == TCP_CLOSE)) 541 break; 542 rc = -ERESTARTSYS; 543 if (signal_pending(current)) 544 break; 545 rc = -EAGAIN; 546 if (!timeout) 547 break; 548 rc = 0; 549 } |
550 finish_wait(sk->sk_sleep, &wait); | 550 finish_wait(sk_sleep(sk), &wait); |
551 return rc; 552} 553 554static int llc_ui_wait_for_conn(struct sock *sk, long timeout) 555{ 556 DEFINE_WAIT(wait); 557 558 while (1) { | 551 return rc; 552} 553 554static int llc_ui_wait_for_conn(struct sock *sk, long timeout) 555{ 556 DEFINE_WAIT(wait); 557 558 while (1) { |
559 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 559 prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
560 if (sk_wait_event(sk, &timeout, sk->sk_state != TCP_SYN_SENT)) 561 break; 562 if (signal_pending(current) || !timeout) 563 break; 564 } | 560 if (sk_wait_event(sk, &timeout, sk->sk_state != TCP_SYN_SENT)) 561 break; 562 if (signal_pending(current) || !timeout) 563 break; 564 } |
565 finish_wait(sk->sk_sleep, &wait); | 565 finish_wait(sk_sleep(sk), &wait); |
566 return timeout; 567} 568 569static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout) 570{ 571 DEFINE_WAIT(wait); 572 struct llc_sock *llc = llc_sk(sk); 573 int rc; 574 575 while (1) { | 566 return timeout; 567} 568 569static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout) 570{ 571 DEFINE_WAIT(wait); 572 struct llc_sock *llc = llc_sk(sk); 573 int rc; 574 575 while (1) { |
576 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 576 prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
577 rc = 0; 578 if (sk_wait_event(sk, &timeout, 579 (sk->sk_shutdown & RCV_SHUTDOWN) || 580 (!llc_data_accept_state(llc->state) && 581 !llc->remote_busy_flag && 582 !llc->p_flag))) 583 break; 584 rc = -ERESTARTSYS; 585 if (signal_pending(current)) 586 break; 587 rc = -EAGAIN; 588 if (!timeout) 589 break; 590 } | 577 rc = 0; 578 if (sk_wait_event(sk, &timeout, 579 (sk->sk_shutdown & RCV_SHUTDOWN) || 580 (!llc_data_accept_state(llc->state) && 581 !llc->remote_busy_flag && 582 !llc->p_flag))) 583 break; 584 rc = -ERESTARTSYS; 585 if (signal_pending(current)) 586 break; 587 rc = -EAGAIN; 588 if (!timeout) 589 break; 590 } |
591 finish_wait(sk->sk_sleep, &wait); | 591 finish_wait(sk_sleep(sk), &wait); |
592 return rc; 593} 594 595static int llc_wait_data(struct sock *sk, long timeo) 596{ 597 int rc; 598 599 while (1) { --- 641 unchanged lines hidden --- | 592 return rc; 593} 594 595static int llc_wait_data(struct sock *sk, long timeo) 596{ 597 int rc; 598 599 while (1) { --- 641 unchanged lines hidden --- |