Project: Real Player for Netbook on ARM.
Synopsis: Fix for audio device not closing properly
Overview:
While stopping the audio device on ARM, we got hang in pthread_join()
inside pthreadthreads.cpp. This call was made from
CAudioOutUNIX::_Imp_Close().
This would probably be a problem with pthread library.
Commenting out this call to Exit for our platform and wrapped it inside
platform specific define.
'join' will just wait for the child thread to exit. If we don't wait,
the OS will clean up the thread anyway.
Files Modified:
/cvsroot/audio/device/platform/unix/audUnix.cpp
Image Size and Heap Use impact (Client -Only):
None.
Platforms and Profiles Affected:
None.
Distribution Libraries Affected:
None.
Distribution library impact and planned action:
None.
Platforms and Profiles Build Verified:
BIF: realplay_gtk_atlas_restricted
Target: player_all
Profile: helix-client-moblin
Branch:
Atlas310
Thanks,
Deepak Jain
Index: audUnix.cpp
===================================================================
RCS file: /cvsroot/audio/device/platform/unix/audUnix.cpp,v
retrieving revision 1.12.2.3
diff -u -r1.12.2.3 audUnix.cpp
--- audUnix.cpp 16 Jul 2008 13:37:00 -0000 1.12.2.3
+++ audUnix.cpp 17 Mar 2009 12:37:48 -0000
@@ -381,7 +381,16 @@
{
HXLOGL4 (HXLOG_ADEV, "CAudioUnixOUT::_Imp_Close signaling
event...");
m_pAvailableDataEvent->SignalEvent();
+#ifdef _XANDROS
+ //XXXdeepakj: Not calling Exit() in case of Xandros ARM as it
was resulting
+ //in HANG at pthread_join(). This can be a issue with the
pthread library.
+ //'join' will just wait for the child thread to exit. If we
don't wait, the OS
+ //will clean up the thread anyway. It will not result in any
leaks or
+ //performance problems
+ //m_audioThread->Exit(0);
+#else
m_audioThread->Exit(0);
+#endif //#ifdef _XANDROS
}
#endif
_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev