Doesn't work.
> + : "=m"(sem->count), "=d"(tmp)
> + : "0"(sem->count), "1"(tmp), "a"(sem)
A "m" constraint cannot be used together with a subsequent number (ie the
"=m" -> "0" thing is illegal - the numbering traditionally only works on
hard registers). It may work with some compilers and with the right
register pressure, but it absolutely _will_ cause problems on other
setups.
I should know, I tried to work around gcc stupidities in this area enough
times, and cursed how various things didn't work with various compilers.
The best thing to do is probably to mark "sem->count" a memory input only,
which together with the memory clobber should be ok.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/