/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: include/sgx/core/threading/mutex.hpp

*/

#ifndef SGX_CORE_THREADING_SGX_MUTEX_HPP
#define SGX_CORE_THREADING_SGX_MUTEX_HPP	1

#define SGX_MUTEX_CAPTURE(_mtx)	_mtx->capture(__FILE__, __LINE__)
#define SGX_MUTEX_RELEASE(_mtx)	_mtx->release()

class CMutex
{
public:
    static  CMutex *create();

    virtual void  capture(const char *pFile, size_t line)=0;
    virtual tBOOL isLocked()=0;
    virtual void  release()=0;
    virtual void  destroy()=0;
};

#endif /* SGX_CORE_THREADING_SGX_MUTEX_HPP */
