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
Code
# if defined( HAVE_ATOMIC_ BUILTINS) increment_ ulint(& os_n_pending_ reads, 1); increment_ ulint(& os_file_ n_pending_ preads, 1); ATOMIC_ INC(MONITOR_ OS_PENDING_ READS); enter(os_ file_count_ mutex); n_pending_ preads+ +; reads++ ; INC(MONITOR_ OS_PENDING_ READS); exit(os_ file_count_ mutex); BUILTINS */
(void) os_atomic_
(void) os_atomic_
MONITOR_
# else
os_mutex_
os_file_
os_n_pending_
MONITOR_
os_mutex_
# endif /* HAVE_ATOMIC_
is not correct for 5.6. Should be
os_mutex_ enter(os_ file_count_ mutex); n_pending_ preads+ +; reads++ ; INC(MONITOR_ OS_PENDING_ READS); exit(os_ file_count_ mutex);
os_file_
os_n_pending_
MONITOR_
os_mutex_
disregarding HAVE_ATOMIC_ BUILTINS