Compare commits
62 Commits
mongodb-3.
...
mongodb-3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88b898e7cb | ||
|
|
7ea2631de2 | ||
|
|
039fe06082 | ||
|
|
43e885a0f9 | ||
|
|
5cdd3e320c | ||
|
|
563b7823f7 | ||
|
|
5e3a56f0ab | ||
|
|
bc929dbcf1 | ||
|
|
07966a492a | ||
|
|
67e412d4c5 | ||
|
|
3c2ad56b50 | ||
|
|
b1768d0d9f | ||
|
|
2893117baa | ||
|
|
4380cec93d | ||
|
|
21b5f9951e | ||
|
|
decd9166cc | ||
|
|
d835a0c0a8 | ||
|
|
48e1343e40 | ||
|
|
eb838c7f12 | ||
|
|
a6957512a4 | ||
|
|
197eef00fd | ||
|
|
7a4f3259b4 | ||
|
|
8326df6b76 | ||
|
|
b65381f64c | ||
|
|
0019262fed | ||
|
|
4d72349b8a | ||
|
|
4898aa408f | ||
|
|
9d375e3416 | ||
|
|
d9ec1ff8ec | ||
|
|
465dca8b46 | ||
|
|
f95877af13 | ||
|
|
62c1a7aa36 | ||
|
|
0dc3f20df6 | ||
|
|
0537648e03 | ||
|
|
3c856645c8 | ||
|
|
10208e8284 | ||
|
|
16e3e48d98 | ||
|
|
5205bb1f0f | ||
|
|
dca63120b7 | ||
|
|
0cccab30c0 | ||
|
|
578a856c19 | ||
|
|
a85c5cda41 | ||
|
|
6da2dc175b | ||
|
|
7ffa315e39 | ||
|
|
26d1ad271f | ||
|
|
fdedd3621c | ||
|
|
4187f419f8 | ||
|
|
42823c9682 | ||
|
|
fbaf1cf4f5 | ||
|
|
3d845c98cb | ||
|
|
1d2fe8a145 | ||
|
|
bdaaaec87d | ||
|
|
35cc116acd | ||
|
|
cbe0fad3e9 | ||
|
|
4f9aa1c548 | ||
|
|
1f44c05f91 | ||
|
|
e31aa8cf29 | ||
|
|
c90bc747e1 | ||
|
|
2c1b7aa80b | ||
|
|
41762ae13c | ||
|
|
f7691f63a6 | ||
|
|
9be5497753 |
2523
NEWS.MONGODB
Normal file
2523
NEWS.MONGODB
Normal file
File diff suppressed because it is too large
Load Diff
@@ -306,6 +306,12 @@ __wt_fair_lock(WT_SESSION_IMPL *session, WT_FAIR_LOCK *lock)
|
||||
__wt_sleep(0, 10);
|
||||
}
|
||||
|
||||
/*
|
||||
* Applications depend on a barrier here so that operations holding the
|
||||
* lock see consistent data.
|
||||
*/
|
||||
WT_READ_BARRIER();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -318,6 +324,12 @@ __wt_fair_unlock(WT_SESSION_IMPL *session, WT_FAIR_LOCK *lock)
|
||||
{
|
||||
WT_UNUSED(session);
|
||||
|
||||
/*
|
||||
* Ensure that all updates made while the lock was held are visible to
|
||||
* the next thread to acquire the lock.
|
||||
*/
|
||||
WT_WRITE_BARRIER();
|
||||
|
||||
/*
|
||||
* We have exclusive access - the update does not need to be atomic.
|
||||
*/
|
||||
|
||||
@@ -183,6 +183,8 @@ __wt_readlock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
|
||||
session, WT_VERB_MUTEX, "rwlock: readlock %s", rwlock->name));
|
||||
WT_STAT_FAST_CONN_INCR(session, rwlock_read);
|
||||
|
||||
WT_DIAGNOSTIC_YIELD;
|
||||
|
||||
l = &rwlock->rwlock;
|
||||
|
||||
/*
|
||||
@@ -213,6 +215,12 @@ __wt_readlock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
|
||||
*/
|
||||
++l->s.readers;
|
||||
|
||||
/*
|
||||
* Applications depend on a barrier here so that operations holding the
|
||||
* lock see consistent data.
|
||||
*/
|
||||
WT_READ_BARRIER();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -306,6 +314,12 @@ __wt_writelock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
|
||||
__wt_sleep(0, 10);
|
||||
}
|
||||
|
||||
/*
|
||||
* Applications depend on a barrier here so that operations holding the
|
||||
* lock see consistent data.
|
||||
*/
|
||||
WT_READ_BARRIER();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -316,31 +330,32 @@ __wt_writelock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
|
||||
int
|
||||
__wt_writeunlock(WT_SESSION_IMPL *session, WT_RWLOCK *rwlock)
|
||||
{
|
||||
wt_rwlock_t *l, copy;
|
||||
wt_rwlock_t *l, new;
|
||||
|
||||
WT_RET(__wt_verbose(
|
||||
session, WT_VERB_MUTEX, "rwlock: writeunlock %s", rwlock->name));
|
||||
|
||||
/*
|
||||
* Ensure that all updates made while the lock was held are visible to
|
||||
* the next thread to acquire the lock.
|
||||
*/
|
||||
WT_WRITE_BARRIER();
|
||||
|
||||
l = &rwlock->rwlock;
|
||||
|
||||
copy = *l;
|
||||
new = *l;
|
||||
|
||||
/*
|
||||
* We're the only writer of the writers/readers fields, so the update
|
||||
* does not need to be atomic; we have to update both values at the
|
||||
* same time though, otherwise we'd potentially race with the thread
|
||||
* next granted the lock.
|
||||
*
|
||||
* Use a memory barrier to ensure the compiler doesn't mess with these
|
||||
* instructions and rework the code in a way that avoids the update as
|
||||
* a unit.
|
||||
*/
|
||||
WT_BARRIER();
|
||||
++new.s.writers;
|
||||
++new.s.readers;
|
||||
l->i.wr = new.i.wr;
|
||||
|
||||
++copy.s.writers;
|
||||
++copy.s.readers;
|
||||
|
||||
l->i.wr = copy.i.wr;
|
||||
WT_DIAGNOSTIC_YIELD;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user