2008-09-16 14:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
+ added DMC to list of compilers which can use __declspec( thread )
+ automatically use TLS for Linux and GLIBC >= 2.6 on x86* machines
* harbour/include/hbthread.h
* harbour/source/vm/estack.c
* harbour/source/vm/thread.c
! clean up typos in OS2 builds
This commit is contained in:
@@ -8,6 +8,16 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2008-09-16 14:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbthread.h
|
||||
+ added DMC to list of compilers which can use __declspec( thread )
|
||||
+ automatically use TLS for Linux and GLIBC >= 2.6 on x86* machines
|
||||
|
||||
* harbour/include/hbthread.h
|
||||
* harbour/source/vm/estack.c
|
||||
* harbour/source/vm/thread.c
|
||||
! clean up typos in OS2 builds
|
||||
|
||||
2008-09-16 13:01 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* source/compiler/hbgenerr.c
|
||||
* Most ':' chars removed from Harbour compiler error messages.
|
||||
|
||||
@@ -188,7 +188,7 @@ HB_EXTERN_BEGIN
|
||||
|
||||
# define HB_CRITICAL_INITVAL ( ( HMTX ) 0 )
|
||||
# define HB_COND_INITVAL ( ( HEV ) 0 )
|
||||
# define HB_THREAD_SELF() _gettid()
|
||||
# define HB_THREAD_SELF() ( ( TID ) _gettid() )
|
||||
|
||||
# define HB_CRITICAL_INIT(v) DosCreateMutexSem( NULL, &(v), 0L, FALSE )
|
||||
# define HB_CRITICAL_DESTROY(v) DosCloseMutexSem( v )
|
||||
@@ -303,13 +303,19 @@ extern void hb_threadMutexUnlockAll( void );
|
||||
*/
|
||||
# if defined( __BORLANDC__ )
|
||||
# define HB_USE_TLS
|
||||
# elif defined( __GNUC__ ) && __GNUC__ >= 3 && \
|
||||
defined( __GLIBC__ ) && defined( __GLIBC_MINOR__ ) && \
|
||||
( __GLIBC__ > 2 || ( __GLIBC__ == 2 && __GLIBC_MINOR__ >= 6 ) ) && \
|
||||
defined( HB_OS_LINUX ) && \
|
||||
( defined( __i386__ ) || defined( __x86_64__ ) )
|
||||
# define HB_USE_TLS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HB_USE_TLS
|
||||
# if ( defined( __GNUC__ ) && __GNUC__ >= 3 ) || defined( __BORLANDC__ )
|
||||
# define HB_TLS_ATTR __thread
|
||||
# elif defined( _MSC_VER ) || defined( __WATCOMC__ )
|
||||
# elif defined( _MSC_VER ) || defined( __WATCOMC__ ) || defined( __DMC__ )
|
||||
# define HB_TLS_ATTR __declspec( thread )
|
||||
# else
|
||||
# undef HB_USE_TLS
|
||||
@@ -331,7 +337,7 @@ extern void hb_threadMutexUnlockAll( void );
|
||||
# elif defined( HB_OS_OS2 )
|
||||
# define HB_TLS_KEY PULONG
|
||||
# define hb_tls_init(k) DosAllocThreadLocalMemory( 1, &k )
|
||||
# define hb_tls_set(k,v) do { *k = ( ULONG ) (v) } while( 0 )
|
||||
# define hb_tls_set(k,v) do { *k = ( ULONG ) (v); } while( 0 )
|
||||
# define hb_tls_get(k) ( *k )
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define INCL_DOSPROCESS
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapicls.h"
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#define HB_OS_WIN_32_USED
|
||||
|
||||
#define INCL_DOSSEMAPHORES
|
||||
#define INCL_DOSPROCESS
|
||||
|
||||
#define _HB_THREAD_INTERNAL_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user