Permalink
Browse files

changed: make some of the default background threads use a smaller st…

…ack size. xbox has a minimum stacksize of 14k, and minimum of 64k if any XTL functions are to be used.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/XBMC@8294 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent 7360260 commit 6c9f25ce8924e7769a9922e5c9f0b732aabae66b elupus committed Mar 23, 2007
Showing with 9 additions and 6 deletions.
  1. +3 −3 xbmc/Application.cpp
  2. +1 −1 xbmc/cdrip/CDDAReader.cpp
  3. +1 −1 xbmc/utils/RssReader.cpp
  4. +3 −0 xbmc/utils/Thread.h
  5. +1 −1 xbmc/utils/UdpClient.cpp
View
@@ -1425,7 +1425,7 @@ void CApplication::PrintXBEToLCD(const char* xbePath)
void CApplication::StartIdleThread()
{
- m_idleThread.Create();
+ m_idleThread.Create(false, 0x100);
}
void CApplication::StopIdleThread()
@@ -1517,7 +1517,7 @@ void CApplication::StartTimeServer()
CLog::Log(LOGNOTICE, "start timeserver client");
m_psntpClient = new CSNTPClient();
- m_psntpClient->Create();
+ m_psntpClient->Create(false, 0x10000);
}
}
#endif
@@ -1694,7 +1694,7 @@ void CApplication::StartServices()
// Start Thread for DVD Mediatype detection
CLog::Log(LOGNOTICE, "start dvd mediatype detection");
- m_DetectDVDType.Create( false);
+ m_DetectDVDType.Create(false, THREAD_MINSTACKSIZE);
CLog::Log(LOGNOTICE, "initializing playlistplayer");
g_playlistPlayer.SetRepeat(PLAYLIST_MUSIC, g_stSettings.m_bMyMusicPlaylistRepeat ? PLAYLIST::REPEAT_ALL : PLAYLIST::REPEAT_NONE);
@@ -43,7 +43,7 @@ bool CCDDAReader::Init(const char* strFileName)
m_sRipBuffer[0].pbtStream = new BYTE[CDIO_CD_FRAMESIZE_RAW * SECTOR_COUNT];
m_sRipBuffer[1].pbtStream = new BYTE[CDIO_CD_FRAMESIZE_RAW * SECTOR_COUNT];
- Create();
+ Create(false, THREAD_MINSTACKSIZE);
return true;
}
View
@@ -62,7 +62,7 @@ void CRssReader::AddToQueue(int iAdd)
{
StopThread();
m_bIsRunning = true;
- CThread::Create();
+ CThread::Create(false, THREAD_MINSTACKSIZE);
}
}
View
@@ -21,6 +21,9 @@ class IRunnable
#undef CTHREAD
#endif
+// minimum as mandated by XTL
+#define THREAD_MINSTACKSIZE 0x10000
+
class CThread
{
public:
View
@@ -43,7 +43,7 @@ bool CUdpClient::Create(void)
ioctlsocket(client_socket, FIONBIO, &nonblocking);
CLog::Log(UDPCLIENT_DEBUG_LEVEL, "UDPCLIENT: Spawning listener thread...");
- CThread::Create(false);
+ CThread::Create(false, THREAD_MINSTACKSIZE);
CLog::Log(UDPCLIENT_DEBUG_LEVEL, "UDPCLIENT: Ready.");

0 comments on commit 6c9f25c

Please sign in to comment.