output.c (62910554656cdcd6b6f84a5154c4155aae4ca231) | output.c (aa395145165cb06a0d0885221bbe0ce4a564391d) |
---|---|
1/* 2 * net/dccp/output.c 3 * 4 * An implementation of the DCCP protocol 5 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 184 unchanged lines hidden (view full) --- 193 194EXPORT_SYMBOL_GPL(dccp_sync_mss); 195 196void dccp_write_space(struct sock *sk) 197{ 198 read_lock(&sk->sk_callback_lock); 199 200 if (sk_has_sleeper(sk)) | 1/* 2 * net/dccp/output.c 3 * 4 * An implementation of the DCCP protocol 5 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 184 unchanged lines hidden (view full) --- 193 194EXPORT_SYMBOL_GPL(dccp_sync_mss); 195 196void dccp_write_space(struct sock *sk) 197{ 198 read_lock(&sk->sk_callback_lock); 199 200 if (sk_has_sleeper(sk)) |
201 wake_up_interruptible(sk->sk_sleep); | 201 wake_up_interruptible(sk_sleep(sk)); |
202 /* Should agree with poll, otherwise some programs break */ 203 if (sock_writeable(sk)) 204 sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); 205 206 read_unlock(&sk->sk_callback_lock); 207} 208 209/** --- 10 unchanged lines hidden (view full) --- 220 DEFINE_WAIT(wait); 221 unsigned long jiffdelay; 222 int rc; 223 224 do { 225 dccp_pr_debug("delayed send by %d msec\n", delay); 226 jiffdelay = msecs_to_jiffies(delay); 227 | 202 /* Should agree with poll, otherwise some programs break */ 203 if (sock_writeable(sk)) 204 sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); 205 206 read_unlock(&sk->sk_callback_lock); 207} 208 209/** --- 10 unchanged lines hidden (view full) --- 220 DEFINE_WAIT(wait); 221 unsigned long jiffdelay; 222 int rc; 223 224 do { 225 dccp_pr_debug("delayed send by %d msec\n", delay); 226 jiffdelay = msecs_to_jiffies(delay); 227 |
228 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 228 prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
229 230 sk->sk_write_pending++; 231 release_sock(sk); 232 schedule_timeout(jiffdelay); 233 lock_sock(sk); 234 sk->sk_write_pending--; 235 236 if (sk->sk_err) 237 goto do_error; 238 if (signal_pending(current)) 239 goto do_interrupted; 240 241 rc = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb); 242 } while ((delay = rc) > 0); 243out: | 229 230 sk->sk_write_pending++; 231 release_sock(sk); 232 schedule_timeout(jiffdelay); 233 lock_sock(sk); 234 sk->sk_write_pending--; 235 236 if (sk->sk_err) 237 goto do_error; 238 if (signal_pending(current)) 239 goto do_interrupted; 240 241 rc = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb); 242 } while ((delay = rc) > 0); 243out: |
244 finish_wait(sk->sk_sleep, &wait); | 244 finish_wait(sk_sleep(sk), &wait); |
245 return rc; 246 247do_error: 248 rc = -EPIPE; 249 goto out; 250do_interrupted: 251 rc = -EINTR; 252 goto out; --- 396 unchanged lines hidden --- | 245 return rc; 246 247do_error: 248 rc = -EPIPE; 249 goto out; 250do_interrupted: 251 rc = -EINTR; 252 goto out; --- 396 unchanged lines hidden --- |