summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-08-24 18:06:44 +0300
committergkodinov/kgeorge@magare.gmz <>2007-08-24 18:06:44 +0300
commit63d18a6057d4ae95f0e7afe07ec97c75e0da55b8 (patch)
tree0138f5d935b18977e1a6b7773e36a4ccfda7cf3a /include/my_time.h
parentc4811d67f7288ef74c795c9a6d7cf9aee2eab98b (diff)
downloadmariadb-git-63d18a6057d4ae95f0e7afe07ec97c75e0da55b8.tar.gz
Bug #28284: Test "mysqlslap" reports "out of memory"
When locking a "fast" mutex a static variable cpu_count was used as a flag to initialize itself on the first usage by calling sysconf() and setting non-zero value. This is not thread and optimization safe on some platforms. That's why the global initialization needs to be done once in a designated function. This will also speed up the usage (by a small bit) because it won't have to check if it's initialized on every call. Fixed by moving the fast mutexes initialization out of my_pthread_fastmutex_lock() to fastmutex_global_init() and call it from my_init()
Diffstat (limited to 'include/my_time.h')
0 files changed, 0 insertions, 0 deletions