Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c84ef530 authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen
Browse files

[PATCH] Use early clobber in semaphores



New code clobbers the result always early, so tell gcc about it
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 34596dc9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static inline int down_interruptible(struct semaphore * sem)
		"jns 2f\n\t"
		"call __down_failed_interruptible\n"
		"2:\n"
		:"=a" (result), "=m" (sem->count)
		:"=&a" (result), "=m" (sem->count)
		:"D" (sem)
		:"memory");
	return result;
@@ -153,7 +153,7 @@ static inline int down_trylock(struct semaphore * sem)
		"jns 2f\n\t"
		"call __down_failed_trylock\n\t"
		"2:\n"
		:"=a" (result), "=m" (sem->count)
		:"=&a" (result), "=m" (sem->count)
		:"D" (sem)
		:"memory","cc");
	return result;