From 7b537c795bd174b4b02418a37b377b4da5cfe266 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 17 Nov 2018 06:07:04 -0800 Subject: Don't pass the current thread to althrd_setname --- Alc/backends/alsa.cpp | 4 ++-- Alc/backends/dsound.cpp | 2 +- Alc/backends/jack.cpp | 2 +- Alc/backends/null.cpp | 2 +- Alc/backends/opensl.cpp | 2 +- Alc/backends/oss.cpp | 4 ++-- Alc/backends/pulseaudio.cpp | 2 +- Alc/backends/qsa.cpp | 2 +- Alc/backends/sndio.cpp | 4 ++-- Alc/backends/solaris.cpp | 2 +- Alc/backends/wasapi.cpp | 4 ++-- Alc/backends/wave.cpp | 2 +- Alc/backends/winmm.cpp | 4 ++-- 13 files changed, 18 insertions(+), 18 deletions(-) (limited to 'Alc/backends') diff --git a/Alc/backends/alsa.cpp b/Alc/backends/alsa.cpp index ee42842b..d02d5d20 100644 --- a/Alc/backends/alsa.cpp +++ b/Alc/backends/alsa.cpp @@ -472,7 +472,7 @@ int ALCplaybackAlsa_mixerProc(ALCplaybackAlsa *self) ALCdevice *device{STATIC_CAST(ALCbackend, self)->mDevice}; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); snd_pcm_uframes_t update_size{device->UpdateSize}; snd_pcm_uframes_t num_updates{device->NumUpdates}; @@ -559,7 +559,7 @@ int ALCplaybackAlsa_mixerNoMMapProc(ALCplaybackAlsa *self) ALCdevice *device{STATIC_CAST(ALCbackend, self)->mDevice}; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); snd_pcm_uframes_t update_size{device->UpdateSize}; snd_pcm_uframes_t num_updates{device->NumUpdates}; diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp index 34d7dc23..a52bb17c 100644 --- a/Alc/backends/dsound.cpp +++ b/Alc/backends/dsound.cpp @@ -249,7 +249,7 @@ FORCE_ALIGN int ALCdsoundPlayback_mixerProc(ALCdsoundPlayback *self) ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); IDirectSoundBuffer *const Buffer{self->Buffer}; diff --git a/Alc/backends/jack.cpp b/Alc/backends/jack.cpp index ac57ffd5..97254582 100644 --- a/Alc/backends/jack.cpp +++ b/Alc/backends/jack.cpp @@ -306,7 +306,7 @@ static int ALCjackPlayback_mixerProc(void *arg) ll_ringbuffer_data_t data[2]; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); ALCjackPlayback_lock(self); while(!ATOMIC_LOAD(&self->killNow, almemory_order_acquire) && diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp index c9ba8de7..7c27e22c 100644 --- a/Alc/backends/null.cpp +++ b/Alc/backends/null.cpp @@ -89,7 +89,7 @@ int ALCnullBackend_mixerProc(ALCnullBackend *self) const milliseconds restTime{device->UpdateSize*1000/device->Frequency / 2}; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); ALint64 done{0}; auto start = std::chrono::steady_clock::now(); diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp index e8a575c8..1c85c9d5 100644 --- a/Alc/backends/opensl.cpp +++ b/Alc/backends/opensl.cpp @@ -244,7 +244,7 @@ static int ALCopenslPlayback_mixerProc(void *arg) SLresult result; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); result = VCALL(self->mBufferQueueObj,GetInterface)(SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &bufferQueue); diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp index cf95bcfe..ebe4b15a 100644 --- a/Alc/backends/oss.cpp +++ b/Alc/backends/oss.cpp @@ -296,7 +296,7 @@ int ALCplaybackOSS_mixerProc(ALCplaybackOSS *self) int sret; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder); @@ -558,7 +558,7 @@ int ALCcaptureOSS_recordProc(ALCcaptureOSS *self) int sret; SetRTPriority(); - althrd_setname(althrd_current(), RECORD_THREAD_NAME); + althrd_setname(RECORD_THREAD_NAME); frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder); diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp index 38623783..df2eb656 100644 --- a/Alc/backends/pulseaudio.cpp +++ b/Alc/backends/pulseaudio.cpp @@ -866,7 +866,7 @@ int PulsePlayback_mixerProc(PulsePlayback *self) ALCdevice *device{STATIC_CAST(ALCbackend,self)->mDevice}; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); unique_palock palock{self->loop}; size_t frame_size{pa_frame_size(&self->spec)}; diff --git a/Alc/backends/qsa.cpp b/Alc/backends/qsa.cpp index da4e6b64..f710f080 100644 --- a/Alc/backends/qsa.cpp +++ b/Alc/backends/qsa.cpp @@ -198,7 +198,7 @@ FORCE_ALIGN static int qsa_proc_playback(void *ptr) int sret; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); /* Increase default 10 priority to 11 to avoid jerky sound */ SchedGet(0, 0, ¶m); diff --git a/Alc/backends/sndio.cpp b/Alc/backends/sndio.cpp index 691bdcde..654c2975 100644 --- a/Alc/backends/sndio.cpp +++ b/Alc/backends/sndio.cpp @@ -98,7 +98,7 @@ static int SndioPlayback_mixerProc(void *ptr) size_t wrote; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder); @@ -340,7 +340,7 @@ static int SndioCapture_recordProc(void* ptr) ALsizei frameSize; SetRTPriority(); - althrd_setname(althrd_current(), RECORD_THREAD_NAME); + althrd_setname(RECORD_THREAD_NAME); frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder); diff --git a/Alc/backends/solaris.cpp b/Alc/backends/solaris.cpp index 029ef1a5..008f3446 100644 --- a/Alc/backends/solaris.cpp +++ b/Alc/backends/solaris.cpp @@ -115,7 +115,7 @@ static int ALCsolarisBackend_mixerProc(void *ptr) int sret; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder); diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp index 4ebd6f25..7f52bafe 100644 --- a/Alc/backends/wasapi.cpp +++ b/Alc/backends/wasapi.cpp @@ -580,7 +580,7 @@ FORCE_ALIGN int ALCwasapiPlayback_mixerProc(ALCwasapiPlayback *self) } SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); ALuint update_size{device->UpdateSize}; UINT32 buffer_len{update_size * device->NumUpdates}; @@ -1251,7 +1251,7 @@ FORCE_ALIGN int ALCwasapiCapture_recordProc(ALCwasapiCapture *self) return 1; } - althrd_setname(althrd_current(), RECORD_THREAD_NAME); + althrd_setname(RECORD_THREAD_NAME); std::vector samples; while(!self->mKillNow.load(std::memory_order_relaxed)) diff --git a/Alc/backends/wave.cpp b/Alc/backends/wave.cpp index fb00ef32..58e0efd5 100644 --- a/Alc/backends/wave.cpp +++ b/Alc/backends/wave.cpp @@ -133,7 +133,7 @@ int ALCwaveBackend_mixerProc(ALCwaveBackend *self) ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; const milliseconds restTime{device->UpdateSize*1000/device->Frequency / 2}; - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); ALsizei frameSize{FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder)}; diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp index 0fb85f66..1d0a8ecc 100644 --- a/Alc/backends/winmm.cpp +++ b/Alc/backends/winmm.cpp @@ -202,7 +202,7 @@ FORCE_ALIGN int ALCwinmmPlayback_mixerProc(ALCwinmmPlayback *self) ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; SetRTPriority(); - althrd_setname(althrd_current(), MIXER_THREAD_NAME); + althrd_setname(MIXER_THREAD_NAME); ALCwinmmPlayback_lock(self); while(!self->killNow.load(std::memory_order_acquire) && @@ -484,7 +484,7 @@ int ALCwinmmCapture_captureProc(ALCwinmmCapture *self) { ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; - althrd_setname(althrd_current(), RECORD_THREAD_NAME); + althrd_setname(RECORD_THREAD_NAME); ALCwinmmCapture_lock(self); while(!self->killNow.load(std::memory_order_acquire) && -- cgit v1.2.3