~ubuntu-branches/ubuntu/vivid/mariadb-5.5/vivid-proposed

« back to all changes in this revision

Viewing changes to storage/xtradb/include/sync0sync.ic

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2014-11-14 21:04:24 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20141114210424-xlyna0ozl11647o5
Tags: 5.5.40-0ubuntu0.14.10.1
* SECURITY UPDATE: Update to 5.5.40 to fix security issues (LP: #1391676)
  - CVE-2014-6507
  - CVE-2014-6491
  - CVE-2014-6500
  - CVE-2014-6469
  - CVE-2014-6555
  - CVE-2014-6559
  - CVE-2014-6494
  - CVE-2014-6496
  - CVE-2014-6464
* Add bsdutils as mariadb-server dependency like upstream does in 5.5.40.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
                ut_a(mutex->lock_word == 0);
93
93
 
94
94
                mutex->lock_word = 1;
 
95
                os_wmb;
95
96
        }
96
97
 
97
98
        return((byte)ret);
108
109
        mutex_t*        mutex)  /*!< in: mutex */
109
110
{
110
111
#if defined(HAVE_ATOMIC_BUILTINS)
111
 
        /* In theory __sync_lock_release should be used to release the lock.
112
 
        Unfortunately, it does not work properly alone. The workaround is
113
 
        that more conservative __sync_lock_test_and_set is used instead. */
114
 
        os_atomic_test_and_set_byte(&mutex->lock_word, 0);
 
112
        os_atomic_lock_release_byte(&mutex->lock_word);
115
113
#else
116
114
        mutex->lock_word = 0;
117
115
 
147
145
 
148
146
        ptr = &(mutex->waiters);
149
147
 
 
148
        os_rmb;
150
149
        return(*ptr);           /* Here we assume that the read of a single
151
150
                                word from memory is atomic */
152
151
}
181
180
        to wake up possible hanging threads if
182
181
        they are missed in mutex_signal_object. */
183
182
 
 
183
        os_isync;
184
184
        if (mutex_get_waiters(mutex) != 0) {
185
185
 
186
186
                mutex_signal_object(mutex);