added 'our version' of wait() and java skeleton plus futex object