thread_join function updated such that unnecessary thread_yield doesn't called incase of tcb1 or tcb2 is NULL