Comment 2 for bug 1379905

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Code

# if defined(HAVE_ATOMIC_BUILTINS)
 (void) os_atomic_increment_ulint(&os_n_pending_reads, 1);
 (void) os_atomic_increment_ulint(&os_file_n_pending_preads, 1);
 MONITOR_ATOMIC_INC(MONITOR_OS_PENDING_READS);
# else
 os_mutex_enter(os_file_count_mutex);
 os_file_n_pending_preads++;
 os_n_pending_reads++;
 MONITOR_INC(MONITOR_OS_PENDING_READS);
 os_mutex_exit(os_file_count_mutex);
# endif /* HAVE_ATOMIC_BUILTINS */

is not correct for 5.6. Should be

 os_mutex_enter(os_file_count_mutex);
 os_file_n_pending_preads++;
 os_n_pending_reads++;
 MONITOR_INC(MONITOR_OS_PENDING_READS);
 os_mutex_exit(os_file_count_mutex);

disregarding HAVE_ATOMIC_BUILTINS