The following line printed output as 4 whereas I was expecting 0.
printk(KERN_INFO "size of spinlock_t %d\n", sizeof(spinlock_t));
I tried this on a system with single cpu. No debugging flags are enabled while building kernel like CONFIG_DEBUG_SPINLOCK or CONFIG_DEBUG_LOCK_ALLOC
. According to kernel header files, it should be zero but output is not consistent with it, any guesses ?