Skip to content

Commit 5b3f117

Browse files
committed
SERVER-6018 Replace AtomicUInt with AtomicUInt32 in SSLManager
1 parent 84cb300 commit 5b3f117

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mongo/util/net/ssl_manager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <vector>
3636

3737
#include "mongo/base/init.h"
38-
#include "mongo/bson/util/atomic_int.h"
38+
#include "mongo/platform/atomic_word.h"
3939
#include "mongo/util/concurrency/mutex.h"
4040
#include "mongo/util/mongoutils/str.h"
4141
#include "mongo/util/net/sock.h"
@@ -79,7 +79,7 @@ namespace mongo {
7979
public:
8080

8181
SSLThreadInfo() {
82-
_id = ++_next;
82+
_id = _next.fetchAndAdd(1);
8383
}
8484

8585
~SSLThreadInfo() {
@@ -113,7 +113,7 @@ namespace mongo {
113113
private:
114114
unsigned _id;
115115

116-
static AtomicUInt _next;
116+
static AtomicUInt32 _next;
117117
// Note: see SERVER-8734 for why we are using a recursive mutex here.
118118
// Once the deadlock fix in OpenSSL is incorporated into most distros of
119119
// Linux, this can be changed back to a nonrecursive mutex.
@@ -129,7 +129,7 @@ namespace mongo {
129129
SSLThreadInfo::get()->lock_callback( mode , type , file , line );
130130
}
131131

132-
AtomicUInt SSLThreadInfo::_next;
132+
AtomicUInt32 SSLThreadInfo::_next;
133133
std::vector<boost::recursive_mutex*> SSLThreadInfo::_mutex;
134134
boost::thread_specific_ptr<SSLThreadInfo> SSLThreadInfo::_thread;
135135

0 commit comments

Comments
 (0)