Skip to content

Commit 7d20443

Browse files
committed
fix(fpm_compile_commands): Add thread safety (OpenMP critical) to command registration
1 parent fd1b1f8 commit 7d20443

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/fpm_compile_commands.F90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ subroutine cct_register(self, command, target_os, error)
287287
file = string_t(source_file))
288288

289289
! Add it to the structure
290+
!$omp critical (command_update)
290291
call cct_register_object(self, cmd, error)
292+
!$omp end critical (command_update)
291293

292294
end subroutine cct_register
293295

0 commit comments

Comments
 (0)