Thread (12 messages) flat view 12 messages, 5 authors, 2007-01-17

Re: [PATCH][v2] atomic_dec_if_positive sign extension fix

From: Gabriel Paubert <hidden>
Date: 2007-01-16 20:08:47

On Tue, Jan 16, 2007 at 12:16:05PM -0600, Robert Jennings wrote:
Paul,

Here is v.2 for the patch. 
Please apply for 2.6.20.  If an atomic counter is explicitly set to a
negative value the atomic_dec_if_positive function will decrement and
store the next smallest value in the atomic counter contrary to it's
intended operation.

The comparison to determine if the decrement will make the result
negative is done by the "addic." operation which operates on a 64-bit
value.  I've changed the addic to an addi (changing "=&r" to "=&g" in
I think the proper constraint is "=&b". 

	Gabriel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help