File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -773,7 +773,7 @@ struct trx_t {
773
773
that it is no longer "active".
774
774
*/
775
775
776
- int32_t n_ref;
776
+ Atomic_counter< int32_t > n_ref;
777
777
778
778
779
779
public:
@@ -1119,26 +1119,26 @@ struct trx_t {
1119
1119
1120
1120
bool is_referenced ()
1121
1121
{
1122
- return my_atomic_load32_explicit (& n_ref, MY_MEMORY_ORDER_RELAXED) > 0 ;
1122
+ return n_ref > 0 ;
1123
1123
}
1124
1124
1125
1125
1126
1126
void reference ()
1127
1127
{
1128
1128
#ifdef UNIV_DEBUG
1129
- int32_t old_n_ref=
1129
+ auto old_n_ref=
1130
1130
#endif
1131
- my_atomic_add32_explicit (& n_ref, 1 , MY_MEMORY_ORDER_RELAXED) ;
1131
+ n_ref++ ;
1132
1132
ut_ad (old_n_ref >= 0 );
1133
1133
}
1134
1134
1135
1135
1136
1136
void release_reference ()
1137
1137
{
1138
1138
#ifdef UNIV_DEBUG
1139
- int32_t old_n_ref=
1139
+ auto old_n_ref=
1140
1140
#endif
1141
- my_atomic_add32_explicit (& n_ref, - 1 , MY_MEMORY_ORDER_RELAXED) ;
1141
+ n_ref-- ;
1142
1142
ut_ad (old_n_ref > 0 );
1143
1143
}
1144
1144
You can’t perform that action at this time.
0 commit comments