Ver Fonte

Alte Abhängikeiten entfernt

Rind há 5 anos atrás
pai
commit
9a651e9ec2
2 ficheiros alterados com 0 adições e 115 exclusões
  1. 0 66
      src/mutex.h
  2. 0 49
      src/uuid.h

+ 0 - 66
src/mutex.h

@@ -1,66 +0,0 @@
-// mutex.h :
-//
-
-#if !defined(AGD_MUTEX_H__307A751D_EF2D_45D6_BBA8_2EB4B79B548D__INCLUDED_)
-#define AGD_MUTEX_H__307A751D_EF2D_45D6_BBA8_2EB4B79B548D__INCLUDED_
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include "uuid.h"
-
-/////////////////////////////////////////////////////////////////////////////
-// mutex.h - Declarations:
-
-#ifdef _WIN32
-#define _DEF_MUTEX_DIR						"."
-#endif	//	_WIN32
-
-#ifdef __linux__
-#define _DEF_MUTEX_DIR						"/tmp"
-#endif	//	__linux__
-
-/////////////////////////////////////////////////////////////////////////////
-
-class CGlobalMutex
-{
-public:
-	CGlobalMutex(void);
-	virtual ~CGlobalMutex(void);
-
-	int Create(const uuid_t &ruuid, const char *pszDir = _DEF_MUTEX_DIR);
-	long Release(void);
-
-	bool Lock(void);
-	bool TryLock(void);
-	bool Unlock(void);
-
-private:
-	int m_nShmID;
-	pthread_mutexattr_t m_mutexAttr;
-	pthread_mutex_t *m_pMutex;
-};
-
-/////////////////////////////////////////////////////////////////////////////
-
-class CLocalMutex
-{
-public:
-	CLocalMutex(void);
-	virtual ~CLocalMutex(void);
-
-	bool Create(bool bRecursive = false);
-	void Release(void);
-
-	bool Lock(void);
-	bool TryLock(void);
-	bool Unlock(void);
-
-private:
-	bool m_bInit;
-	pthread_mutexattr_t m_mutexAttr;
-	pthread_mutex_t m_mutex;
-};
-
-/////////////////////////////////////////////////////////////////////////////
-#endif	//	!defined(AGD_MUTEX_H__307A751D_EF2D_45D6_BBA8_2EB4B79B548D__INCLUDED_)

+ 0 - 49
src/uuid.h

@@ -1,49 +0,0 @@
-// uuid.h :
-//
-
-#if !defined(AGD_UUID_H__E2CBFDC3_1EA5_4220_8D44_D0C26219B529__INCLUDED_)
-#define AGD_UUID_H__E2CBFDC3_1EA5_4220_8D44_D0C26219B529__INCLUDED_
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif	//	__cplusplus
-
-/////////////////////////////////////////////////////////////////////////////
-// uuid.h - Declarations:
-
-#ifdef __linux__
-typedef struct _UUID
-{
-    uint32_t Data1;
-    uint16_t Data2;
-    uint16_t Data3;
-    uint8_t  Data4[8];
-}UUID;
-#define uuid_t UUID
-#endif	//	__linux__
-
-#define DEFINE_UUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
-											const uuid_t name = {l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}
-
-#define _UUID_STRING_LEN					36
-
-/////////////////////////////////////////////////////////////////////////////
-
-extern const uuid_t UUID_NULL;
-
-/////////////////////////////////////////////////////////////////////////////
-
-int		_uuid_parse		(const char *pszIn, uuid_t *uuid);
-int		_uuid_unparse	(const uuid_t *uuid, char *pszOut, size_t nCChOut);
-int		_uuid_compare	(const uuid_t *uuid1, const uuid_t *uuid2);
-void	_uuid_copy		(uuid_t *uuDest, const uuid_t *uuSrc);
-int		_uuid_is_null	(const uuid_t *uuid);
-
-/////////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-}
-#endif	//	__cplusplus
-#endif	//	!defined(AGD_UUID_H__E2CBFDC3_1EA5_4220_8D44_D0C26219B529__INCLUDED_)