rit128x96x4.c,os.*: Changed a few things to implement new semaphore type