target__has_per_thread
if (target__has_per_thread(&target) && err != EOPNOTSUPP &&
else if (target__has_per_thread(target))