summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.c
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2019-03-05 18:58:20 +0100
committergluster-ant <bugzilla-bot@gluster.org>2019-03-05 18:58:20 +0100
commitdae78d39bf60d470f67a23f47a715b477aed60f2 (patch)
treed30e0f2c7aa921eef5fbb2fd784a27409add674e /libglusterfs/src/stack.c
parent2e28915803782f7c5dbc2a461235e80fc20b0ae4 (diff)
downloadglusterfs-dae78d39bf60d470f67a23f47a715b477aed60f2.tar.gz
glusterfs-dae78d39bf60d470f67a23f47a715b477aed60f2.tar.xz
glusterfs-dae78d39bf60d470f67a23f47a715b477aed60f2.zip
core: avoid dynamic TLS allocation when possible
Some interdependencies between logging and memory management functions make it impossible to use the logging framework before initializing memory subsystem because they both depend on Thread Local Storage allocated through pthread_key_create() during initialization. This causes a crash when we try to log something very early in the initialization phase. To prevent this, several dynamically allocated TLS structures have been replaced by static TLS reserved at compile time using '__thread' keyword. This also reduces the number of error sources, making initialization simpler. Updates: bz#1193929 Change-Id: I8ea2e072411e30790d50084b6b7e909c7bb01d50 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'libglusterfs/src/stack.c')
0 files changed, 0 insertions, 0 deletions