@@ -871,6 +871,12 @@ bbdoc: Declare a global variable
keyword: "Global"
End Rem
+Rem
+bbdoc: Declare a threaded global variable
+about: Each thread will have its own copy of the variable - any changes to the variable will be visible only within the thread the change was made.
+keyword: "ThreadedGlobal"
+End Rem
+
Rem
bbdoc: Declare a field variable
keyword: "Field"
@@ -149,6 +149,8 @@ extern bb_mutex_t _bbLock;
#define BB_LOCK if( _bbNeedsLock ){ bb_mutex_lock( &_bbLock ); }
#define BB_UNLOCK if( _bbNeedsLock ){ bb_mutex_unlock( &_bbLock ); }
+#define BBThreadLocal __thread
#ifdef __cplusplus
}
#endif