Add ATmega328P Xplained Mini board. The board is an official
development kit from MCHP based on the Arduino UNO, reduced
hardware, with a xplainedmini debugger and CDC ACM serial
converter.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Replace direct accesses to sched_active_thread and sched_active_pid with
the helper functions thread_getpid() and thread_get_active(). This serves
two purposes:
1. It makes accidental writes to those variable from outside core less likely.
2. Casting off the volatile qualifier is now well contained to those two
functions
The test currently uses static globals for communication without any protection.
This could lead optimizing C compilers to deduce that access to those are not
needed (e.g. with LTO enabled). Using C11 atomics is the easiest way to tell
the compiler that those accesses are used for communication between two
different threads of execution (here: between the ISR and the main thread).