003 File Manager
Current Path:
/usr/src/contrib/llvm-project/openmp/runtime/src
usr
/
src
/
contrib
/
llvm-project
/
openmp
/
runtime
/
src
/
📁
..
📄
dllexports
(49.75 KB)
📄
exports_so.txt
(2.97 KB)
📄
extractExternal.cpp
(14.86 KB)
📁
i18n
📁
include
📄
kmp.h
(150.49 KB)
📄
kmp_affinity.cpp
(184.91 KB)
📄
kmp_affinity.h
(28.58 KB)
📄
kmp_alloc.cpp
(69.75 KB)
📄
kmp_atomic.cpp
(179.29 KB)
📄
kmp_atomic.h
(90.96 KB)
📄
kmp_barrier.cpp
(88.39 KB)
📄
kmp_cancel.cpp
(11.35 KB)
📄
kmp_config.h.cmake
(3.37 KB)
📄
kmp_csupport.cpp
(138.04 KB)
📄
kmp_debug.cpp
(3.54 KB)
📄
kmp_debug.h
(8.17 KB)
📄
kmp_debugger.cpp
(10.44 KB)
📄
kmp_debugger.h
(1.97 KB)
📄
kmp_dispatch.cpp
(90.11 KB)
📄
kmp_dispatch.h
(17.22 KB)
📄
kmp_dispatch_hier.h
(41.94 KB)
📄
kmp_environment.cpp
(14.35 KB)
📄
kmp_environment.h
(2.22 KB)
📄
kmp_error.cpp
(16 KB)
📄
kmp_error.h
(2.11 KB)
📄
kmp_ftn_cdecl.cpp
(1018 B)
📄
kmp_ftn_entry.h
(41.9 KB)
📄
kmp_ftn_extra.cpp
(971 B)
📄
kmp_ftn_os.h
(30.82 KB)
📄
kmp_ftn_stdcall.cpp
(895 B)
📄
kmp_global.cpp
(19.3 KB)
📄
kmp_gsupport.cpp
(91.3 KB)
📄
kmp_i18n.cpp
(27.56 KB)
📄
kmp_i18n.h
(6.77 KB)
📄
kmp_import.cpp
(1.04 KB)
📄
kmp_io.cpp
(6.38 KB)
📄
kmp_io.h
(1.1 KB)
📄
kmp_itt.cpp
(4.96 KB)
📄
kmp_itt.h
(14.32 KB)
📄
kmp_itt.inl
(38.74 KB)
📄
kmp_lock.cpp
(134.18 KB)
📄
kmp_lock.h
(52.92 KB)
📄
kmp_omp.h
(8.34 KB)
📄
kmp_os.h
(44.1 KB)
📄
kmp_platform.h
(5.35 KB)
📄
kmp_runtime.cpp
(289.73 KB)
📄
kmp_safe_c_api.h
(2.28 KB)
📄
kmp_sched.cpp
(37.33 KB)
📄
kmp_settings.cpp
(191.93 KB)
📄
kmp_settings.h
(3.26 KB)
📄
kmp_stats.cpp
(29.13 KB)
📄
kmp_stats.h
(40.94 KB)
📄
kmp_stats_timing.cpp
(3.59 KB)
📄
kmp_stats_timing.h
(3.6 KB)
📄
kmp_str.cpp
(22.28 KB)
📄
kmp_str.h
(4.48 KB)
📄
kmp_stub.cpp
(9.68 KB)
📄
kmp_stub.h
(1.56 KB)
📄
kmp_taskdeps.cpp
(29.79 KB)
📄
kmp_taskdeps.h
(3.93 KB)
📄
kmp_tasking.cpp
(177.28 KB)
📄
kmp_threadprivate.cpp
(26.22 KB)
📄
kmp_utility.cpp
(10.73 KB)
📄
kmp_version.cpp
(7.04 KB)
📄
kmp_version.h
(2.38 KB)
📄
kmp_wait_release.cpp
(905 B)
📄
kmp_wait_release.h
(32.1 KB)
📄
kmp_wrapper_getpid.h
(2.04 KB)
📄
kmp_wrapper_malloc.h
(7.2 KB)
📄
libomp.rc.var
(2.81 KB)
📄
ompt-event-specific.h
(4.38 KB)
📄
ompt-general.cpp
(23.73 KB)
📄
ompt-internal.h
(3.62 KB)
📄
ompt-specific.cpp
(14.43 KB)
📄
ompt-specific.h
(5.32 KB)
📄
test-touch.c
(688 B)
📁
thirdparty
📄
tsan_annotations.cpp
(5.92 KB)
📄
tsan_annotations.h
(6.77 KB)
📄
z_Linux_asm.S
(41.09 KB)
📄
z_Linux_util.cpp
(81.69 KB)
📄
z_Windows_NT-586_asm.asm
(30.37 KB)
📄
z_Windows_NT-586_util.cpp
(3.49 KB)
📄
z_Windows_NT_util.cpp
(52.15 KB)
Editing: kmp_i18n.h
/* * kmp_i18n.h */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef KMP_I18N_H #define KMP_I18N_H #include "kmp_str.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /* kmp_i18n_id.inc defines kmp_i18n_id_t type. It is an enumeration with identifiers of all the messages in the catalog. There is one special identifier: kmp_i18n_null, which denotes absence of message. */ #include "kmp_i18n_id.inc" // Generated file. Do not edit it manually. /* Low-level functions handling message catalog. __kmp_i18n_open() opens message catalog, __kmp_i18n_closes() it. Explicit opening is not required: if message catalog is not yet open, __kmp_i18n_catgets() will open it implicitly. However, catalog should be explicitly closed, otherwise resources (mamory, handles) may leak. __kmp_i18n_catgets() returns read-only string. It should not be freed. KMP_I18N_STR macro simplifies access to strings in message catalog a bit. Following two lines are equivalent: __kmp_i18n_catgets( kmp_i18n_str_Warning ) KMP_I18N_STR( Warning ) */ void __kmp_i18n_catopen(); void __kmp_i18n_catclose(); char const *__kmp_i18n_catgets(kmp_i18n_id_t id); #define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id) /* High-level interface for printing strings targeted to the user. All the strings are divided into 3 types: * messages, * hints, * system errors. There are 3 kind of message severities: * informational messages, * warnings (non-fatal errors), * fatal errors. For example: OMP: Warning #2: Cannot open message catalog "libguide.cat": (1) OMP: System error #2: No such file or directory (2) OMP: Hint: Please check NLSPATH environment variable. (3) OMP: Info #3: Default messages will be used. (4) where (1) is a message of warning severity, (2) is a system error caused the previous warning, (3) is a hint for the user how to fix the problem, (4) is a message of informational severity. Usage in complex cases (message is accompanied with hints and system errors): int error = errno; // We need save errno immediately, because it may // be changed. __kmp_msg( kmp_ms_warning, // Severity KMP_MSG( CantOpenMessageCatalog, name ), // Primary message KMP_ERR( error ), // System error KMP_HNT( CheckNLSPATH ), // Hint __kmp_msg_null // Variadic argument list finisher ); Usage in simple cases (just a message, no system errors or hints): KMP_INFORM( WillUseDefaultMessages ); KMP_WARNING( CantOpenMessageCatalog, name ); KMP_FATAL( StackOverlap ); KMP_SYSFAIL( "pthread_create", status ); KMP_CHECK_SYSFAIL( "pthread_create", status ); KMP_CHECK_SYSFAIL_ERRNO( "gettimeofday", status ); */ enum kmp_msg_type { kmp_mt_dummy = 0, // Special type for internal purposes. kmp_mt_mesg = 4, // Primary OpenMP message, could be information, warning, or fatal. kmp_mt_hint = 5, // Hint to the user. kmp_mt_syserr = -1 // System error message. }; // enum kmp_msg_type typedef enum kmp_msg_type kmp_msg_type_t; struct kmp_msg { kmp_msg_type_t type; int num; char *str; int len; }; // struct kmp_message typedef struct kmp_msg kmp_msg_t; // Special message to denote the end of variadic list of arguments. extern kmp_msg_t __kmp_msg_null; // Helper functions. Creates messages either from message catalog or from // system. Note: these functions allocate memory. You should pass created // messages to __kmp_msg() function, it will print messages and destroy them. kmp_msg_t __kmp_msg_format(unsigned id_arg, ...); kmp_msg_t __kmp_msg_error_code(int code); kmp_msg_t __kmp_msg_error_mesg(char const *mesg); // Helper macros to make calls shorter. #define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__) #define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__) #define KMP_SYSERRCODE(code) __kmp_msg_error_code(code) #define KMP_SYSERRMESG(mesg) __kmp_msg_error_mesg(mesg) #define KMP_ERR KMP_SYSERRCODE // Message severity. enum kmp_msg_severity { kmp_ms_inform, // Just information for the user. kmp_ms_warning, // Non-fatal error, execution continues. kmp_ms_fatal // Fatal error, program aborts. }; // enum kmp_msg_severity typedef enum kmp_msg_severity kmp_msg_severity_t; // Primary function for printing messages for the user. The first message is // mandatory. Any number of system errors and hints may be specified. Argument // list must be finished with __kmp_msg_null. void __kmp_msg(kmp_msg_severity_t severity, kmp_msg_t message, ...); KMP_NORETURN void __kmp_fatal(kmp_msg_t message, ...); // Helper macros to make calls shorter in simple cases. #define KMP_INFORM(...) \ __kmp_msg(kmp_ms_inform, KMP_MSG(__VA_ARGS__), __kmp_msg_null) #define KMP_WARNING(...) \ __kmp_msg(kmp_ms_warning, KMP_MSG(__VA_ARGS__), __kmp_msg_null) #define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null) #define KMP_SYSFAIL(func, error) \ __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error), \ __kmp_msg_null) // Check error, if not zero, generate fatal error message. #define KMP_CHECK_SYSFAIL(func, error) \ { \ if (error) { \ KMP_SYSFAIL(func, error); \ } \ } // Check status, if not zero, generate fatal error message using errno. #define KMP_CHECK_SYSFAIL_ERRNO(func, status) \ { \ if (status != 0) { \ int error = errno; \ KMP_SYSFAIL(func, error); \ } \ } #ifdef KMP_DEBUG void __kmp_i18n_dump_catalog(kmp_str_buf_t *buffer); #endif // KMP_DEBUG #ifdef __cplusplus }; // extern "C" #endif // __cplusplus #endif // KMP_I18N_H // end of file //
Upload File
Create Folder