Context switching on Arduino Zero

Hi Dude,

I've Arduino Zero board and try to learn about ARM context switching feature. I understand that ARM Context-M0 has two separate stack pointers (main and process stack pointers) for privilege/unprivileged thread mode.

This feature is mainly used in multitasking like RTOS, but it's too complicated for me to understand the feature and how it works.

Can anyone please guide me how to get started for this feature with simple examples?

Best regards,