summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2019-06-20 15:07:12 +0300
committerPanu Matilainen <pmatilai@redhat.com>2020-03-26 11:57:58 +0200
commiteaa5e34602c081dedeada123e4ae74525461ca51 (patch)
treeebdfc146d31117b6b57e595b32e0c3e12343206e
parent65707259c847cd95646b0111ff38c36f5a0df8f5 (diff)
downloadrpm-eaa5e34602c081dedeada123e4ae74525461ca51.tar.gz
Fix excessive use of thread local storage (RhBug:1722181), part II
This essentially reverts commit ff43d03d1f9686c9ffa9232a64e253783309feb5 which made these all thread local. It might not be quite right, but then using TLS is not sensible either - threads have their own signal *mask*, but disposition is global, and most of what we do here is global anyway. In addition, the signal queue is only enabled in places where threads are not used (or would not be safe anyhow) so reverting for now seems the lesser evil. (cherry picked from commit 453e7afa406168b83b1f3244db4a096f247a76b9)
-rw-r--r--rpmio/rpmsq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rpmio/rpmsq.c b/rpmio/rpmsq.c
index d157514e9..249a204b3 100644
--- a/rpmio/rpmsq.c
+++ b/rpmio/rpmsq.c
@@ -16,9 +16,9 @@
#include "debug.h"
-static __thread int disableInterruptSafety;
-static __thread sigset_t rpmsqCaught;
-static __thread sigset_t rpmsqActive;
+static int disableInterruptSafety;
+static sigset_t rpmsqCaught;
+static sigset_t rpmsqActive;
typedef struct rpmsig_s * rpmsig;
@@ -171,8 +171,8 @@ int rpmsqPoll(void)
int rpmsqBlock(int op)
{
- static __thread sigset_t oldMask;
- static __thread int blocked = 0;
+ static sigset_t oldMask;
+ static int blocked = 0;
sigset_t newMask;
int ret = 0;