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
44e58d60
Commit
44e58d60
authored
Nov 20, 2022
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some bugs with initialization of POSIX threads.
parent
d28c1ebe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
CHANGES.md
CHANGES.md
+1
-0
miniaudio.h
miniaudio.h
+6
-3
No files found.
CHANGES.md
View file @
44e58d60
...
@@ -2,6 +2,7 @@ v0.11.12 - TBD
...
@@ -2,6 +2,7 @@ v0.11.12 - TBD
=====================
=====================
*
Fix a crash due to a race condition in the resource manager.
*
Fix a crash due to a race condition in the resource manager.
*
Fix a crash with some backends when rerouting the playback side of a duplex device.
*
Fix a crash with some backends when rerouting the playback side of a duplex device.
*
Fix some bugs with initialization of POSIX threads.
v0.11.11 - 2022-11-04
v0.11.11 - 2022-11-04
...
...
miniaudio.h
View file @
44e58d60
...
@@ -15852,6 +15852,10 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority
...
@@ -15852,6 +15852,10 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority
pthread_attr_t attr;
pthread_attr_t attr;
if (pthread_attr_init(&attr) == 0) {
if (pthread_attr_init(&attr) == 0) {
int scheduler = -1;
int scheduler = -1;
/* We successfully initialized our attributes object so we can assign the pointer so it's passed into pthread_create(). */
pAttr = &attr;
if (priority == ma_thread_priority_idle) {
if (priority == ma_thread_priority_idle) {
#ifdef SCHED_IDLE
#ifdef SCHED_IDLE
if (pthread_attr_setschedpolicy(&attr, SCHED_IDLE) == 0) {
if (pthread_attr_setschedpolicy(&attr, SCHED_IDLE) == 0) {
...
@@ -15895,9 +15899,8 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority
...
@@ -15895,9 +15899,8 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority
}
}
}
}
if (pthread_attr_setschedparam(&attr, &sched) == 0) {
/* I'm not treating a failure of setting the priority as a critical error so not checking the return value here. */
pAttr = &attr;
pthread_attr_setschedparam(&attr, &sched);
}
}
}
}
}
}
}
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