xtensa: check thread flags atomically on return from user exception
xtensa: check thread flags atomically on return from user exception

Check pending signals and rescheduling thread flags with interrupts
disabled, and don't enable them if no flags are set. Call
trace_hardirqs_on after thread flags handling, so that rescheduling is
done and hardirqs tracking flag is updated in the correct task context.

Signed-off-by: Max Filippov <8c5ea195856807f4f02a6e0749c87ea6b7375f38@gmail.com>
Signed-off-by: Chris Zankel <711c73f64afdce07b7e38039a96d2224209e9a6c@zankel.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs