8 static CRITICAL_SECTION __fb_global_mutex;
9 static CRITICAL_SECTION __fb_string_mutex;
10 static CRITICAL_SECTION __fb_mtcore_mutex;
11 FBCALL void fb_Lock(
void ) { EnterCriticalSection( &__fb_global_mutex ); }
12 FBCALL void fb_Unlock(
void ) { LeaveCriticalSection( &__fb_global_mutex ); }
13 FBCALL void fb_StrLock(
void ) { EnterCriticalSection( &__fb_string_mutex ); }
14 FBCALL void fb_StrUnlock(
void ) { LeaveCriticalSection( &__fb_string_mutex ); }
15 FBCALL void fb_MtLock(
void ) { EnterCriticalSection( &__fb_mtcore_mutex ); }
16 FBCALL void fb_MtUnlock(
void ) { LeaveCriticalSection( &__fb_mtcore_mutex ); }
26 #define _PC_64 0x00000000
27 #define _RC_NEAR 0x00000000
28 #define _MCW_RC 0x00000300
29 #define _MCW_PC 0x00030000
30 _CRTIMP
unsigned int __cdecl __MINGW_NOTHROW _controlfp (
unsigned int unNew,
unsigned int unMask);
33 _controlfp( _PC_64|_RC_NEAR, _MCW_PC|_MCW_RC );
34 #elif defined HOST_X86
36 unsigned int control_word;
38 __asm__ __volatile__(
"fstcw %0" :
"=m" (control_word) : );
40 control_word = (control_word & 0xF0FF) | 0x300;
42 __asm__ __volatile__(
"fldcw %0" : :
"m" (control_word) );
47 InitializeCriticalSection(&__fb_global_mutex);
48 InitializeCriticalSection(&__fb_string_mutex);
49 InitializeCriticalSection(&__fb_mtcore_mutex);
58 DeleteCriticalSection(&__fb_global_mutex);
59 DeleteCriticalSection(&__fb_string_mutex);
60 DeleteCriticalSection(&__fb_mtcore_mutex);