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

Unlock mutex before return #737

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Unlock mutex before return #737

merged 1 commit into from
Jul 27, 2023

Conversation

MicroYY
Copy link
Contributor

@MicroYY MicroYY commented Jul 25, 2023

Always release mutex before return.

Signed-off-by: Jay Yang [email protected]

@MicroYY MicroYY changed the title Fix kw issue Adjust code order to avoid mutex not released Jul 25, 2023
va/va_trace.c Outdated

TRACE_FUNCNAME(idx);

va_TraceMsg(trace_ctx, "\tsurfaceId = 0x%08x\n", surfaceId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I liked that these 3 items would be printed regardless of memType check.... Consider that someone will need to extend this function to cover other mem types - he will need to basically revert your change.

Thus, please, revert back the change and handle mutex issue in a different way, i.e. either call DPY2TRACE_VIRCTX_EXIT before each return or use goto exit instead of return.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Updated.

Always release mutex before return.

Signed-off-by: Jay Yang <[email protected]>
@MicroYY MicroYY changed the title Adjust code order to avoid mutex not released Unlock mutex before return Jul 26, 2023
Copy link
Contributor

@dvrogozh dvrogozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@XinfengZhang XinfengZhang merged commit 23f7a41 into intel:master Jul 27, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants