/* build fixed tables only once--keep them here */
-local int fixed_lock = 0;
+#ifdef MULTI_THREADED
+local volatile int fixed_lock = 0;
+#endif
local int fixed_built = 0;
#define FIXEDH 530 /* number of hufts used by fixed tables */
local uInt fixed_left = FIXEDH;
inflate_huft * FAR *td; /* distance tree result */
{
/* build fixed tables if not built already--lock out other instances */
+#ifdef MULTI_THREADED
while (++fixed_lock > 1)
fixed_lock--;
+#endif
if (!fixed_built)
{
int k; /* temporary variable */
/* done */
fixed_built = 1;
}
+#ifdef MULTI_THREADED
fixed_lock--;
+#endif
*bl = fixed_bl;
*bd = fixed_bd;
*tl = fixed_tl;