Skip to content

Commit

Permalink
Use new init_mutex in GRIB_MUTEX_INIT_ONCE
Browse files Browse the repository at this point in the history
  • Loading branch information
CronoPT committed Nov 5, 2024
1 parent 19bacb5 commit 97d686d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/grib_filepool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ grib_file* grib_file_pool_create_clone(grib_context* c, short clone_id, grib_fil
newfile->pool_file = pool_file;
newfile->pool_file_refcount = 0;

GRIB_MUTEX_INIT_ONCE(&once, &init);
GRIB_MUTEX_INIT_ONCE(&once, &init_mutex);
GRIB_MUTEX_LOCK(&mutex1);

++pool_file->pool_file_refcount;
Expand All @@ -283,7 +283,7 @@ void grib_file_pool_delete_clone(grib_file* cloned_file)
grib_file* pool_file = cloned_file->pool_file;
if(pool_file)
{
GRIB_MUTEX_INIT_ONCE(&once, &init);
GRIB_MUTEX_INIT_ONCE(&once, &init_mutex);
GRIB_MUTEX_LOCK(&mutex1);
if(pool_file->pool_file_refcount > 0)
{
Expand Down

0 comments on commit 97d686d

Please sign in to comment.