Path: blob/main/contrib/llvm-project/openmp/runtime/src/kmp_debugger.h
35258 views
#if USE_DEBUGGER1/*2* kmp_debugger.h -- debugger support.3*/45//===----------------------------------------------------------------------===//6//7// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.8// See https://llvm.org/LICENSE.txt for license information.9// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception10//11//===----------------------------------------------------------------------===//1213#ifndef KMP_DEBUGGER_H14#define KMP_DEBUGGER_H1516#ifdef __cplusplus17extern "C" {18#endif // __cplusplus1920/* This external variable can be set by any debugger to flag to the runtime21that we are currently executing inside a debugger. This will allow the22debugger to override the number of threads spawned in a parallel region by23using __kmp_omp_num_threads() (below).24* When __kmp_debugging is TRUE, each team and each task gets a unique integer25identifier that can be used by debugger to conveniently identify teams and26tasks.27* The debugger has access to __kmp_omp_debug_struct_info which contains28information about the OpenMP library's important internal structures. This29access will allow the debugger to read detailed information from the typical30OpenMP constructs (teams, threads, tasking, etc. ) during a debugging31session and offer detailed and useful information which the user can probe32about the OpenMP portion of their code. */33extern int __kmp_debugging; /* Boolean whether currently debugging OpenMP RTL */34// Return number of threads specified by the debugger for given parallel region.35/* The ident field, which represents a source file location, is used to check if36the debugger has changed the number of threads for the parallel region at37source file location ident. This way, specific parallel regions' number of38threads can be changed at the debugger's request. */39int __kmp_omp_num_threads(ident_t const *ident);4041#ifdef __cplusplus42} // extern "C"43#endif // __cplusplus4445#endif // KMP_DEBUGGER_H4647#endif // USE_DEBUGGER484950