diff options
Diffstat (limited to 'runtime/src/z_Windows_NT_util.cpp')
-rw-r--r-- | runtime/src/z_Windows_NT_util.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/runtime/src/z_Windows_NT_util.cpp b/runtime/src/z_Windows_NT_util.cpp index 20a6fad..f13ff29 100644 --- a/runtime/src/z_Windows_NT_util.cpp +++ b/runtime/src/z_Windows_NT_util.cpp @@ -592,7 +592,7 @@ void __kmp_runtime_initialize(void) { if (__kmp_init_runtime) { return; - }; + } #if KMP_DYNAMIC_LIB /* Pin dynamic library for the lifetime of application */ @@ -618,7 +618,7 @@ void __kmp_runtime_initialize(void) { #if (KMP_ARCH_X86 || KMP_ARCH_X86_64) if (!__kmp_cpuinfo.initialized) { __kmp_query_cpuid(&__kmp_cpuinfo); - }; // if + } #endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */ /* Set up minimum number of threads to switch to TLS gtid */ @@ -662,7 +662,7 @@ void __kmp_runtime_initialize(void) { __kmp_str_buf_reserve(&path, path_size); path_size = GetSystemDirectory(path.str, path.size); KMP_DEBUG_ASSERT(path_size > 0); - }; // if + } if (path_size > 0 && path_size < path.size) { // Now we have system directory name in the buffer. // Append backslash and name of dll to form full path, @@ -1144,7 +1144,7 @@ void __kmp_create_monitor(kmp_info_t *th) { if (__kmp_monitor_ev == NULL) { DWORD error = GetLastError(); __kmp_fatal(KMP_MSG(CantCreateEvent), KMP_ERR(error), __kmp_msg_null); - }; // if + } #if USE_ITT_BUILD __kmp_itt_system_object_created(__kmp_monitor_ev, "Event"); #endif /* USE_ITT_BUILD */ @@ -1196,7 +1196,7 @@ int __kmp_is_thread_alive(kmp_info_t *th, DWORD *exit_val) { DWORD error = GetLastError(); __kmp_fatal(KMP_MSG(FunctionError, "GetExitCodeThread()"), KMP_ERR(error), __kmp_msg_null); - }; // if + } return (*exit_val == STILL_ACTIVE); } @@ -1244,7 +1244,7 @@ static void __kmp_reap_common(kmp_info_t *th) { KMP_FSYNC_CANCEL(obj); } else { KMP_FSYNC_SPIN_ACQUIRED(obj); - }; // if + } #endif /* USE_ITT_BUILD */ } @@ -1257,7 +1257,7 @@ static void __kmp_reap_common(kmp_info_t *th) { KA_TRACE(1, ("__kmp_reap_common: thread still active.\n")); } else if ((void *)exit_val != (void *)th) { KA_TRACE(1, ("__kmp_reap_common: ExitProcess / TerminateThread used?\n")); - }; // if + } KA_TRACE(10, ("__kmp_reap_common: done reaping (%d), handle = %" KMP_UINTPTR_SPEC @@ -1286,7 +1286,7 @@ void __kmp_reap_monitor(kmp_info_t *th) { if (th->th.th_info.ds.ds_gtid != KMP_GTID_MONITOR) { KA_TRACE(10, ("__kmp_reap_monitor: monitor did not start, returning\n")); return; - }; // if + } KMP_MB(); /* Flush all pending memory write invalidates. */ @@ -1318,7 +1318,7 @@ static void __kmp_team_handler(int signo) { // Stage 1 signal handler, let's shut down all of the threads. if (__kmp_debug_buf) { __kmp_dump_debug_buffer(); - }; // if + } KMP_MB(); // Flush all pending memory write invalidates. TCW_4(__kmp_global.g.g_abort, signo); KMP_MB(); // Flush all pending memory write invalidates. @@ -1333,7 +1333,7 @@ static sig_func_t __kmp_signal(int signum, sig_func_t handler) { int error = errno; __kmp_fatal(KMP_MSG(FunctionError, "signal"), KMP_ERR(error), __kmp_msg_null); - }; // if + } return old; } @@ -1349,7 +1349,7 @@ static void __kmp_install_one_handler(int sig, sig_func_t handler, __kmp_siginstalled[sig] = 1; } else { // Restore/keep user's handler if one previously installed. old = __kmp_signal(sig, old); - }; // if + } } else { // Save initial/system signal handlers to see if user handlers installed. // 2009-09-23: It is a dead code. On Windows* OS __kmp_install_signals @@ -1357,7 +1357,7 @@ static void __kmp_install_one_handler(int sig, sig_func_t handler, old = __kmp_signal(sig, SIG_DFL); __kmp_sighldrs[sig] = old; __kmp_signal(sig, old); - }; // if + } KMP_MB(); /* Flush all pending memory write invalidates. */ } // __kmp_install_one_handler @@ -1372,11 +1372,11 @@ static void __kmp_remove_one_handler(int sig) { "restoring: sig=%d\n", sig)); old = __kmp_signal(sig, old); - }; // if + } __kmp_sighldrs[sig] = NULL; __kmp_siginstalled[sig] = 0; KMP_MB(); // Flush all pending memory write invalidates. - }; // if + } } // __kmp_remove_one_handler void __kmp_install_signals(int parallel_init) { @@ -1385,7 +1385,7 @@ void __kmp_install_signals(int parallel_init) { KB_TRACE(10, ("__kmp_install_signals: KMP_HANDLE_SIGNALS is false - " "handlers not installed\n")); return; - }; // if + } __kmp_install_one_handler(SIGINT, __kmp_team_handler, parallel_init); __kmp_install_one_handler(SIGILL, __kmp_team_handler, parallel_init); __kmp_install_one_handler(SIGABRT, __kmp_team_handler, parallel_init); @@ -1399,7 +1399,7 @@ void __kmp_remove_signals(void) { KB_TRACE(10, ("__kmp_remove_signals: called\n")); for (sig = 1; sig < NSIG; ++sig) { __kmp_remove_one_handler(sig); - }; // for sig + } } // __kmp_remove_signals #endif // KMP_HANDLE_SIGNALS @@ -1480,11 +1480,11 @@ int __kmp_get_load_balance(int max) { if (NtQuerySystemInformation == NULL) { running_threads = -1; goto finish; - }; // if + } if (max <= 0) { max = INT_MAX; - }; // if + } do { @@ -1498,7 +1498,7 @@ int __kmp_get_load_balance(int max) { if (buffer == NULL) { running_threads = -1; goto finish; - }; // if + } status = NtQuerySystemInformation(SystemProcessInformation, buffer, buff_size, &info_size); first_time = 0; @@ -1531,7 +1531,7 @@ int __kmp_get_load_balance(int max) { if (spi->NextEntryOffset != 0) { CHECK(spi_size <= spi->NextEntryOffset); // And do not overlap with the next record. - }; // if + } // pid == 0 corresponds to the System Idle Process. It always has running // threads on all cores. So, we don't consider the running threads of this // process. @@ -1547,14 +1547,14 @@ int __kmp_get_load_balance(int max) { if (running_threads >= max) { goto finish; } - } // if - }; // for i - } // if + } + } + } if (spi->NextEntryOffset == 0) { break; - }; // if + } spi = PSYSTEM_PROCESS_INFORMATION(uintptr_t(spi) + spi->NextEntryOffset); - }; // forever + } #undef CHECK @@ -1562,7 +1562,7 @@ finish: // Clean up and exit. if (buffer != NULL) { KMP_INTERNAL_FREE(buffer); - }; // if + } glb_running_threads = running_threads; |