Hard X-ray emission processes in solar flares