Is there any?
This thing is easy to implement using inline asm (like peek/poke which I already did) , so it is not a big problem, but it should exist somewhere for the multicore beast such as a P2.
The Spin2 lockclr, locknew, lockrel, and locktry functions are available in all languages, but with underscores in front of their names (so _lockclr, _locknew, _lockrel, and _locktry).
Note that _lockrel is called _lockclr for historical reasons (I implemented the functions before Spin2 was finalized). I'll add an alias in the next release so that either can be used.