@@ -258,8 +258,8 @@ fd_funkier_rec_publish( fd_funkier_rec_prepare_t * prepare ) {
258
258
259
259
/* We need to hold the pool lock whilst inserting and removing from the map, to make the updates
260
260
to the prev_idx/next_idx pointers atomic. */
261
- fd_funkier_rec_pool_lock ( & rec_pool , 1 );
262
261
fd_rwlock_write (& _pool_lock );
262
+ fd_funkier_rec_pool_lock ( & rec_pool , 1 );
263
263
rec -> prev_idx = rec_prev_idx ;
264
264
if ( fd_funkier_rec_idx_is_null ( rec_prev_idx ) ) {
265
265
* rec_head_idx = rec_idx ;
@@ -270,8 +270,8 @@ fd_funkier_rec_publish( fd_funkier_rec_prepare_t * prepare ) {
270
270
if ( fd_funkier_rec_map_insert ( & rec_map , rec , FD_MAP_FLAG_BLOCKING ) ) {
271
271
FD_LOG_CRIT (( "fd_funkier_rec_map_insert failed" ));
272
272
}
273
- fd_rwlock_unwrite (& _pool_lock );
274
273
fd_funkier_rec_pool_unlock ( & rec_pool );
274
+ fd_rwlock_unwrite (& _pool_lock );
275
275
}
276
276
277
277
void
@@ -343,17 +343,17 @@ fd_funkier_rec_hard_remove( fd_funkier_t * funk,
343
343
}
344
344
fd_funkier_rec_key_copy ( pair -> key , key );
345
345
346
- fd_funkier_rec_pool_lock ( & rec_pool , 1 );
347
346
fd_rwlock_write (& _pool_lock );
347
+ fd_funkier_rec_pool_lock ( & rec_pool , 1 );
348
348
349
349
fd_funkier_rec_t * rec = NULL ;
350
350
for (;;) {
351
351
fd_funkier_rec_map_query_t rec_query [1 ];
352
352
int err = fd_funkier_rec_map_remove ( & rec_map , pair , NULL , rec_query , FD_MAP_FLAG_BLOCKING );
353
353
if ( FD_UNLIKELY ( err == FD_MAP_ERR_AGAIN ) ) continue ;
354
354
if ( err == FD_MAP_ERR_KEY ) {
355
- fd_rwlock_unwrite (& _pool_lock );
356
355
fd_funkier_rec_pool_unlock ( & rec_pool );
356
+ fd_rwlock_unwrite (& _pool_lock );
357
357
return ;
358
358
}
359
359
if ( FD_UNLIKELY ( err != FD_MAP_SUCCESS ) ) FD_LOG_CRIT (( "map corruption" ));
@@ -374,8 +374,8 @@ fd_funkier_rec_hard_remove( fd_funkier_t * funk,
374
374
if ( fd_funkier_rec_idx_is_null ( next_idx ) ) txn -> rec_tail_idx = prev_idx ;
375
375
else rec_pool .ele [ next_idx ].prev_idx = prev_idx ;
376
376
}
377
- fd_rwlock_unwrite (& _pool_lock );
378
377
fd_funkier_rec_pool_unlock ( & rec_pool );
378
+ fd_rwlock_unwrite (& _pool_lock );
379
379
380
380
fd_funkier_val_flush ( rec , alloc , wksp );
381
381
fd_rwlock_write (& _pool_lock );
0 commit comments