patch-2.3.16 linux/net/netlink/af_netlink.c
Next file: linux/net/netlink/netlink_dev.c
Previous file: linux/net/lapb/lapb_iface.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Tue Aug 31 11:30:48 1999
- Orig file:
v2.3.15/linux/net/netlink/af_netlink.c
- Orig date:
Thu Aug 26 13:05:46 1999
diff -u --recursive --new-file v2.3.15/linux/net/netlink/af_netlink.c linux/net/netlink/af_netlink.c
@@ -103,16 +103,16 @@
DECLARE_WAITQUEUE(wait, current);
add_wait_queue(&nl_table_wait, &wait);
- do {
- current->state = TASK_UNINTERRUPTIBLE;
+ for(;;) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
if (atomic_read(&nl_table_users) == 0)
break;
write_unlock_bh(&nl_table_lock);
schedule();
write_lock_bh(&nl_table_lock);
- } while (atomic_read(&nl_table_users));
+ }
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
remove_wait_queue(&nl_table_wait, &wait);
}
}
@@ -417,10 +417,8 @@
return -EAGAIN;
}
+ __set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&sk->protinfo.af_netlink->wait, &wait);
- current->state = TASK_INTERRUPTIBLE;
-
- barrier();
if ((atomic_read(&sk->rmem_alloc) > sk->rcvbuf ||
test_bit(0, &sk->protinfo.af_netlink->state)) &&
@@ -428,7 +426,7 @@
!sk->dead)
schedule();
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
remove_wait_queue(&sk->protinfo.af_netlink->wait, &wait);
sock_put(sk);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)