semaphore: use numeric_limits instead of INT_MAX

Signed-off-by: Tim Blechmann <tim@klingt.org>