Added a mutex to implemente mutual exclusive access to intn

Change-Id: If78093e792e74b1166161b16130b0d26a96a4b8c
Deleted unused code

Change-Id: I2f68324fef3cf2decab9ad22cace3ce4329ce24d
Added error handling to intn testing programm.

Change-Id: Ife03e45b469e346b8be853efb9ac34358748f9d4