Re: sleep_on removal from drivers/net/shaper.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 23, 2004 at 05:41:28PM +0200, Domen Puncer wrote:
> --- c/drivers/net/shaper.c	Wed Jun 16 07:19:43 2004
> +++ a/drivers/net/shaper.c	Fri Jul 23 17:25:07 2004
> @@ -112,7 +112,7 @@
>  	while (test_and_set_bit(0, &sh->locked))
>  	{
>  		if (!in_interrupt())
> -			sleep_on(&sh->wait_queue);
> +			wait_event(sh->wait_queue, 0);
>  		else
>  			return 0;


wait_event on a non-schaning event is rather buggy.  As a first aid wait
for test_bit on sh->locked, but this whole loop screams for beeing replaced
by proper locking-primitives.
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux