Added make-sem and free-sem, fixed return value on sem-init