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

fix SpinLockMutex for Intel Compiler #1885

Merged
merged 2 commits into from
Dec 22, 2022

Conversation

gabswb
Copy link
Contributor

@gabswb gabswb commented Dec 22, 2022

Fixes #1771

Changes

see intel Pause Intrinsic doc

Include immintrin.h and use _mm_pause() when __INTEL_COMPILER defined.
Could also use sched_yield() from sched.h but the solution above seems to work.

(This PR replaces the previous one because the CLAs could not be signed correctly)

@gabswb gabswb requested a review from a team December 22, 2022 13:16
@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #1885 (b57ccf8) into main (9dd19a2) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1885   +/-   ##
=======================================
  Coverage   85.71%   85.71%           
=======================================
  Files         171      171           
  Lines        5240     5240           
=======================================
  Hits         4491     4491           
  Misses        749      749           
Impacted Files Coverage Δ
api/include/opentelemetry/common/spin_lock_mutex.h 25.00% <ø> (ø)

Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

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

LGTM, and thanks for your contribution.

@lalitb lalitb merged commit 8866c10 into open-telemetry:main Dec 22, 2022
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.

[API common] undefined reference to __builtin_ia32_pause when using Intel Compilers
4 participants