forked from OSchip/llvm-project
[OpenMP] Fixed Bug 49356
Bug 49356 (https://bugs.llvm.org/show_bug.cgi?id=49356) reports crash in the test case `tasking/bug_taskwait_detach.cpp`, which is caused by the wrong function declaration. `gtid` in `__kmpc_omp_task` should be `kmp_int32`. Reviewed By: AndreyChurbanov Differential Revision: https://reviews.llvm.org/D102584
This commit is contained in:
parent
fded6f77c3
commit
af6511d730
|
@ -3,6 +3,7 @@
|
|||
#include <omp.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
|
@ -10,7 +11,7 @@
|
|||
#define PTASK_FLAG_DETACHABLE 0x40
|
||||
|
||||
// OpenMP RTL interfaces
|
||||
typedef long long kmp_int64;
|
||||
using kmp_int32 = int32_t;
|
||||
|
||||
typedef struct ID {
|
||||
int reserved_1;
|
||||
|
@ -59,7 +60,8 @@ extern "C" {
|
|||
extern int __kmpc_global_thread_num(void *id_ref);
|
||||
extern int **__kmpc_omp_task_alloc(id *loc, int gtid, int flags, size_t sz,
|
||||
size_t shar, task_entry_t rtn);
|
||||
extern int __kmpc_omp_task(id *loc, kmp_int64 gtid, kmp_task_t *task);
|
||||
extern kmp_int32 __kmpc_omp_task(ident_t *loc_ref, kmp_int32 gtid,
|
||||
kmp_task_t *new_task);
|
||||
extern omp_event_handle_t __kmpc_task_allow_completion_event(ident_t *loc_ref,
|
||||
int gtid,
|
||||
kmp_task_t *task);
|
||||
|
|
Loading…
Reference in New Issue