basic thread support; still broken on Windows; untested on Mac OS X

This commit is contained in:
Araq 2011-01-18 02:22:01 +01:00
commit 66cfc851a1
17 changed files with 521 additions and 127 deletions

View file

@ -71,7 +71,11 @@ __TINYC__
# define NIM_CONST const
#endif
#define NIM_THREADVAR __thread
#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__))
# define NIM_THREADVAR __declspec(thread)
#else
# define NIM_THREADVAR __thread
#endif
/* --------------- how int64 constants should be declared: ----------- */
#if defined(__GNUC__) || defined(__LCC__) || \
@ -415,8 +419,9 @@ struct TFrame {
NI len;
};
/*
extern TFrame* framePtr;
/*extern TSafePoint* excHandler; */
extern TSafePoint* excHandler; */
#if defined(__cplusplus)
struct NimException {