spinlock: Make sure C and C++ have the same sizeof(k_spinlock) value
spinlock: Make sure C and C++ have the same sizeof(k_spinlock) value

If CONFIG_SMP and SPIN_VALIDATE are both not defined the k_spinlock
struct will have no members. The result is that in C the sizeof
value of struct k_spinlock is 0 and in C++ it is 1.

This size difference causes problems when the k_spinlock
is embedded into another struct like k_msgq, because C and
C++ will have different ideas on the offsets of the members
that come after the k_spinlock member.

To prevent this we add a 1 byte dummy member to k_spinlock
when the user selects C++ support and k_spinlock would
otherwise be empty.

Signed-off-by: Erwin Rol <0c2a6e12a3ee3123563f88831cd6d692c33fb195@erwinrol.com>

nashif/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,Vudentz/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,nashif/zephyr,Vudentz/zephyr,nashif/zephyr,finikorg/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr