Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144542259
D27336.1775318572.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27336.1775318572.diff
View Options
diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c
--- a/contrib/bsnmp/lib/asn1.c
+++ b/contrib/bsnmp/lib/asn1.c
@@ -1019,7 +1019,7 @@
char *
asn_oid2str(const struct asn_oid *oid)
{
- static char str[ASN_OIDSTRLEN];
+ __thread static char str[ASN_OIDSTRLEN];
return (asn_oid2str_r(oid, str));
}
diff --git a/contrib/bsnmp/lib/snmpclient.h b/contrib/bsnmp/lib/snmpclient.h
--- a/contrib/bsnmp/lib/snmpclient.h
+++ b/contrib/bsnmp/lib/snmpclient.h
@@ -114,7 +114,7 @@
};
/* the global context */
-extern struct snmp_client snmp_client;
+extern __thread struct snmp_client snmp_client;
/* initizialies a snmp_client structure */
void snmp_client_init(struct snmp_client *);
diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c
--- a/contrib/bsnmp/lib/snmpclient.c
+++ b/contrib/bsnmp/lib/snmpclient.c
@@ -71,7 +71,7 @@
#define DEBUG_PARSE 0
/* global context */
-struct snmp_client snmp_client;
+__thread struct snmp_client snmp_client;
/* List of all outstanding requests */
struct sent_pdu {
@@ -86,7 +86,7 @@
};
LIST_HEAD(sent_pdu_list, sent_pdu);
-static struct sent_pdu_list sent_pdus;
+__thread static struct sent_pdu_list sent_pdus;
/*
* Prototype table entry. All C-structure produced by the table function must
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 4:02 PM (11 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28260336
Default Alt Text
D27336.1775318572.diff (1 KB)
Attached To
Mode
D27336: Make bsnmpclient(3) thread-safe
Attached
Detach File
Event Timeline
Log In to Comment