task switching and current pointer implemenation question