library: extend thread safety to more static variables
In the commit referenced below, a '__thread' attribute
was added to numerous static variables to protect them
from concurrent access conflicts with multi-threading.
Unfortunately, that patch did not go quite far enough.
So, this commit adds a few more '__thread' qualifiers.
Reference(s):
commit 23cfb71366
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
|
||||
static char ERRname[] = "?";
|
||||
|
||||
static struct pwbuf {
|
||||
static __thread struct pwbuf {
|
||||
struct pwbuf *next;
|
||||
uid_t uid;
|
||||
char name[P_G_SZ];
|
||||
@@ -67,7 +67,7 @@ char *pwcache_get_user(uid_t uid) {
|
||||
return((*p)->name);
|
||||
}
|
||||
|
||||
static struct grpbuf {
|
||||
static __thread struct grpbuf {
|
||||
struct grpbuf *next;
|
||||
gid_t gid;
|
||||
char name[P_G_SZ];
|
||||
|
||||
Reference in New Issue
Block a user