Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Code is ok (you just test the value at some moment and return whether it's zero or not.
The thing that is IMHO not OK is that function to peek for current value of syncronization variable is almost useless: you cannot do something atomically with this test. I.e. when function returns, return value may be already out-dated. Atomic test-and-set and test-and-reset functions are good but (strictly speaking) function that just tests looks senseless (even for operations like TryLock).