calling assembly function from c and java threads