sock.c (ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672) sock.c (b03efcfb2180289718991bb984044ce6c5b7d1b0)
1/*
2 RFCOMM implementation for Linux Bluetooth stack (BlueZ).
3 Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>
4 Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation;

--- 576 unchanged lines hidden (view full) ---

585static long rfcomm_sock_data_wait(struct sock *sk, long timeo)
586{
587 DECLARE_WAITQUEUE(wait, current);
588
589 add_wait_queue(sk->sk_sleep, &wait);
590 for (;;) {
591 set_current_state(TASK_INTERRUPTIBLE);
592
1/*
2 RFCOMM implementation for Linux Bluetooth stack (BlueZ).
3 Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>
4 Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation;

--- 576 unchanged lines hidden (view full) ---

585static long rfcomm_sock_data_wait(struct sock *sk, long timeo)
586{
587 DECLARE_WAITQUEUE(wait, current);
588
589 add_wait_queue(sk->sk_sleep, &wait);
590 for (;;) {
591 set_current_state(TASK_INTERRUPTIBLE);
592
593 if (skb_queue_len(&sk->sk_receive_queue) || sk->sk_err || (sk->sk_shutdown & RCV_SHUTDOWN) ||
594 signal_pending(current) || !timeo)
593 if (!skb_queue_empty(&sk->sk_receive_queue) ||
594 sk->sk_err ||
595 (sk->sk_shutdown & RCV_SHUTDOWN) ||
596 signal_pending(current) ||
597 !timeo)
595 break;
596
597 set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
598 release_sock(sk);
599 timeo = schedule_timeout(timeo);
600 lock_sock(sk);
601 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
602 }

--- 407 unchanged lines hidden ---
598 break;
599
600 set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
601 release_sock(sk);
602 timeo = schedule_timeout(timeo);
603 lock_sock(sk);
604 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
605 }

--- 407 unchanged lines hidden ---