firefix: add 3.5.5
[vuplus_openembedded] / recipes / mozilla / firefox-3.5.5 / jemalloc-tls.patch
1 --- /tmp/jemalloc.c     2008-06-23 10:57:36.000000000 +0200
2 +++ mozilla/memory/jemalloc/jemalloc.c  2008-06-23 11:20:13.000000000 +0200
3 @@ -386,7 +386,7 @@
4  #else
5  #  define NO_TLS
6  #endif
7 -#if 0
8 +
9  #ifdef __i386__
10  #  define QUANTUM_2POW_MIN     4
11  #  define SIZEOF_PTR_2POW      2
12 @@ -420,7 +420,6 @@
13  #  define QUANTUM_2POW_MIN     4
14  #  define SIZEOF_PTR_2POW      2
15  #endif
16 -#endif
17  
18  #define        SIZEOF_PTR              (1U << SIZEOF_PTR_2POW)
19  
20 @@ -2582,7 +2581,7 @@
21                  * knowledge of how _pthread_self() calculates values, we can't
22                  * easily do much better than this.
23                  */
24 -               ind = (unsigned long) _pthread_self() % narenas;
25 +               ind = 255255 % narenas;
26  
27                 /*
28                  * Optimistially assume that arenas[ind] has been initialized.