Before a thread locks a mutex, I want to check whether it has already got a lock on that mutex **so I can't do this**:

```
Acquire mutex
Acquire mutex

// do something here

Release mutex

// still has mutex lock at this point!!

```

I know I could just use a bool here, but wanted to know if something already exists.

Thanks.