summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-02-28 12:30:08 -0800
committerGlenn Kasten <gkasten@google.com>2012-02-28 16:38:09 -0800
commit86e3362f1589eda1b1604f9d0fa31b3a78ef8aec (patch)
tree227bfe3b3d8b924366b34e5eabfb707d6186e0e0 /services
parentf64dfccd96286255fd382486c94cdb48921c45fa (diff)
downloadframeworks_base-86e3362f1589eda1b1604f9d0fa31b3a78ef8aec.zip
frameworks_base-86e3362f1589eda1b1604f9d0fa31b3a78ef8aec.tar.gz
frameworks_base-86e3362f1589eda1b1604f9d0fa31b3a78ef8aec.tar.bz2
Shorten thread names
prctl(PR_SET_NAME) limits to 15 characters. Before we had names like "Binder Thread #" and the counter was cut off :-( Also remove redundant "thread" at end of name; it's always a thread. Change-Id: I1f99c2730ba0787ed9b59c15914356cddf698e2f
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp4
-rw-r--r--services/audioflinger/AudioFlinger.h2
-rw-r--r--services/audioflinger/AudioPolicyService.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 462c2fa..b7ddbb5 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1464,7 +1464,7 @@ AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinge
mMasterVolume(audioFlinger->masterVolumeSW_l()),
mLastWriteTime(0), mNumWrites(0), mNumDelayedWrites(0), mInWrite(false)
{
- snprintf(mName, kNameLength, "AudioOut_%d", id);
+ snprintf(mName, kNameLength, "AudioOut_%X", id);
readOutputParameters();
@@ -4791,7 +4791,7 @@ AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger,
// mBytesRead is only meaningful while active, and so is cleared in start()
// (but might be better to also clear here for dump?)
{
- snprintf(mName, kNameLength, "AudioIn_%d", id);
+ snprintf(mName, kNameLength, "AudioIn_%X", id);
readInputParameters();
}
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index e908d3f..457bd98 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -548,7 +548,7 @@ private:
Vector< sp<EffectChain> > mEffectChains;
uint32_t mDevice; // output device for PlaybackThread
// input + output devices for RecordThread
- static const int kNameLength = 32;
+ static const int kNameLength = 16; // prctl(PR_SET_NAME) limit
char mName[kNameLength];
sp<IPowerManager> mPowerManager;
sp<IBinder> mWakeLockToken;
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index 987b039..753b1d2 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -69,7 +69,7 @@ AudioPolicyService::AudioPolicyService()
// start tone playback thread
mTonePlaybackThread = new AudioCommandThread(String8(""));
// start audio commands thread
- mAudioCommandThread = new AudioCommandThread(String8("ApmCommandThread"));
+ mAudioCommandThread = new AudioCommandThread(String8("ApmCommand"));
/* instantiate the audio policy manager */
rc = hw_get_module(AUDIO_POLICY_HARDWARE_MODULE_ID, &module);
@@ -638,7 +638,7 @@ void AudioPolicyService::AudioCommandThread::onFirstRef()
if (mName != "") {
run(mName.string(), ANDROID_PRIORITY_AUDIO);
} else {
- run("AudioCommandThread", ANDROID_PRIORITY_AUDIO);
+ run("AudioCommand", ANDROID_PRIORITY_AUDIO);
}
}