Revert "semaphore: Remove mutex emulation"

This reverts commit 4882720b267b7b1d1b0ce08334b205f0329d4615.
kconfig: fix set but not used variables

Some variables were being set but never used, which was triggering
warnings in GCC >= 4.6.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>