mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
79eba188f7
Ideally, we'd be reusing some Mutex class we have in Gecko, the base one in mozglue/misc being the best candidate. However, the contraints in mozjemalloc make that unconvenient: - Can't have a constructor because malloc_init() would likely run before it, and that would mean the mutexes would be re-initialized. - Can't have a destructor because code will run after static destructors, and some of that code likely will invoke the allocator, and we can't have destructed mutexes by then. - Can't use pthread_mutex on OSX because that loops back into the allocator. Accomodating the use of Gecko mutexes around those constraints would mean much more code than just implementing a new mutex class, so the latter is preferred. --HG-- extra : rebase_source : d2e180a5007390c620aa6d7921340b9784c7699f |
||
---|---|---|
.. | ||
build | ||
fallible | ||
gtest | ||
mozalloc | ||
replace | ||
volatile | ||
moz.build |