[Openmp-commits] [PATCH] D127160: Define OpenMP alloc macros before they are used
Petr Penzin via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jun 6 15:38:45 PDT 2022
penzn created this revision.
penzn added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
penzn requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Move KMP 'ALLOC' macro definitions in `kmp.h` before they can be used in `kmp_barrier.h`.
Fixes: https://github.com/llvm/llvm-project/issues/55815
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D127160
Files:
openmp/runtime/src/kmp.h
Index: openmp/runtime/src/kmp.h
===================================================================
--- openmp/runtime/src/kmp.h
+++ openmp/runtime/src/kmp.h
@@ -106,6 +106,11 @@
#include <xmmintrin.h>
#endif
+#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
+#define KMP_INTERNAL_FREE(p) free(p)
+#define KMP_INTERNAL_REALLOC(p, sz) realloc((p), (sz))
+#define KMP_INTERNAL_CALLOC(n, sz) calloc((n), (sz))
+
#include "kmp_debug.h"
#include "kmp_lock.h"
#include "kmp_version.h"
@@ -3462,11 +3467,6 @@
#define __kmp_thread_free(th, ptr) \
___kmp_thread_free((th), (ptr)KMP_SRC_LOC_CURR)
-#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
-#define KMP_INTERNAL_FREE(p) free(p)
-#define KMP_INTERNAL_REALLOC(p, sz) realloc((p), (sz))
-#define KMP_INTERNAL_CALLOC(n, sz) calloc((n), (sz))
-
extern void __kmp_push_num_threads(ident_t *loc, int gtid, int num_threads);
extern void __kmp_push_proc_bind(ident_t *loc, int gtid,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127160.434629.patch
Type: text/x-patch
Size: 970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220606/00225e6e/attachment.bin>
More information about the Openmp-commits
mailing list