Re: [PATCH v8 3/6] MCS Lock: optimizations and extra comments

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

 



On Mon, Jan 20, 2014 at 05:24:28PM -0800, Tim Chen wrote:
> @@ -41,8 +47,11 @@ void mcs_spin_lock(struct mcs_spinlock **lock, struct mcs_spinlock *node)
>  
>  	prev = xchg(lock, node);
>  	if (likely(prev == NULL)) {
> -		/* Lock acquired */
> -		node->locked = 1;
> +		/* Lock acquired, don't need to set node->locked to 1
> +		 * as lock owner and other contenders won't check this value.
> +		 * If a debug mode is needed to audit lock status, then
> +		 * set node->locked value here.
> +		 */

Fail in comment style.

>  		return;
>  	}
>  	ACCESS_ONCE(prev->next) = node;
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux