Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exception safety to the OpenMP interface. #213

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/quo-vadis-omp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

/**
* @file quo-vadis-thread.cc
* @file quo-vadis-omp.cc
*/

#include "qvi-common.h" // IWYU pragma: keep
Expand All @@ -23,8 +23,8 @@
#include "qvi-scope.h"
#include "qvi-utils.h"

int
qv_omp_scope_get(
static int
qvi_omp_scope_get(
qv_scope_intrinsic_t iscope,
qv_scope_t **scope
) {
Expand All @@ -38,6 +38,18 @@ qv_omp_scope_get(
return qvi_scope_get(zgroup, iscope, scope);
}

int
qv_omp_scope_get(
qv_scope_intrinsic_t iscope,
qv_scope_t **scope
) {
if (!scope) return QV_ERR_INVLD_ARG;
try {
return qvi_omp_scope_get(iscope, scope);
}
qvi_catch_and_return();
}

/*
* vim: ft=cpp ts=4 sts=4 sw=4 expandtab
*/
Loading