adding retval set in gtthread_exit