Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
78aeabfa
Commit
78aeabfa
authored
Jun 14, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ma_yield().
parent
103574f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
miniaudio.h
miniaudio.h
+19
-6
No files found.
miniaudio.h
View file @
78aeabfa
...
@@ -8254,15 +8254,28 @@ static MA_INLINE void ma_yield()
...
@@ -8254,15 +8254,28 @@ static MA_INLINE void ma_yield()
#ifdef MA_POSIX
#ifdef MA_POSIX
posix_yield();
posix_yield();
#else
#else
#if defined(MA_X86) || defined(MA_X64)
#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
#if defined(_MSC_VER) && _MSC_VER >= 1400
/* x86/x64 */
_mm_pause();
#if defined(_MSC_VER) && !defined(__clang__)
#if _MSC_VER >= 1400
_mm_pause();
#else
__asm pause;
#endif
#else
__asm__ __volatile__ ("pause");
#endif
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 6) || (defined(_M_ARM) && _M_ARM >= 6)
/* ARM */
#if defined(_MSC_VER)
/* Apparently there is a __yield() intrinsic that's compatible with ARM, but I cannot find documentation for it nor can I find where it's declared. */
__yield();
#else
#else
__asm
pause
;
__asm
__ __volatile__ ("yield")
;
#endif
#endif
#else
/* Unknown or unsupported architecture. No-op. */
#endif
#endif
/* TODO: Implement me. x86 = PAUSE; ARM = YIELD; */
#endif
#endif
}
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment