The most important point is:
- you cannot implement a functioning spin lock in user space (for all practical intents and purposes and if you don't resort to extreme measures and talking modern general purpose operating systems)
- you cannot implement a functioning spin lock in user space (for all practical intents and purposes and if you don't resort to extreme measures and talking modern general purpose operating systems)
Only then it makes sense tu use spin locks.
Even if your thread won't be scheduled off the core I don't know if you might still have irqs stealing time during the critical section.
In general you should expect userspace code to be scheduled out at any time and use locking primitives that the kernel knows about.