int done = INST_NOT_DONE_YET; #define INST_DONE_WAIT_FOR_NEXT_EVENT 1 //this signifies that the current event has been processed and instance is ready for next one #define INST_DONE_WAIT_FOR_NEXT_EVENT_TO 2 //this signifies that the current event has