lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 07 Oct 2008 18:09:06 +0100
From:	richard kennedy <richard@....demon.co.uk>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Theodore Ts'o <tytso@....edu>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [PATCH, RFC] percpu_counters: make fbc->count read atomic on
   32 bit architecture

Peter Zijlstra wrote:
....
> +static inline int atomic64_dec_and_test(atomic64_t *v)
> +{
> +	int ret;
> +
> +	write_seqlock(&v->slock);
> +	v->counter--;
> +	ret = !v->counter;
> +	write_sequnlock(&v->slock);
> +
> +	return ret;
> +}
> +
> +static inline int atomic64_add_and_test(atomic64_t *v)
> +{
> +	int ret;
> +
> +	write_seqlock(&v->slock);
> +	v->counter++;
> +	ret = !v->counter;
> +	write_sequnlock(&v->slock);
> +
> +	return ret;
> +}
would it be more logical to call this atomic64_inc_and_test to match the
above dec_and_test ?

regards
Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ