fix semphr api, add spinlock api

Signed-off-by: Wilfried Chauveau <ithinuel@gmail.com>