Blame view

DxDecoder/DxStd.h 1021 Bytes
85cc8cb9   Hu Chunming   ๅŽŸ็‰ˆไปฃ็ 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  #ifndef __DX__STD__MODULE__
  #define __DX__STD__MODULE__
  #include <sys/time.h>
  #include <unistd.h>
  #include <errno.h>
  #include <pthread.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  
  typedef void * CRITICAL_SECTION;  
  typedef pthread_t HANDLE;
  typedef unsigned int DWORD;
  typedef void * ( * dx_thread_proc )( void * param );
  typedef bool BOOL;
  
  #define TRUE true
  #define FALSE false
  #define __stdcall __attribute__((stdcall))
  
  #define INVALID_HANDLE_VALUE  0
  #define INFINITE              (-1)
  
  void InitializeCriticalSection( CRITICAL_SECTION * cri );
  void DeleteCriticalSection( CRITICAL_SECTION * cri );
  void EnterCriticalSection( CRITICAL_SECTION * cri );
  void LeaveCriticalSection( CRITICAL_SECTION * cri );
  
  
  HANDLE CreateThread( void * a, void * b, dx_thread_proc proc, void * params, void * c, DWORD * ret );
  void WaitForSingleObject( HANDLE thread, int tm );
  
  void Sleep( unsigned int ms );
  unsigned int GetTickCount();
  int memicmp( const char * src, const char * dst, unsigned int len );
  	
  #endif