Browse Source

ps3: fix CPU and stack size performance issues on the PS3.

legacy
Sam Hocevar sam 12 years ago
parent
commit
9a95a8ec30
2 changed files with 10 additions and 2 deletions
  1. +4
    -1
      src/platform/ps3/threadbase.h
  2. +6
    -1
      src/ticker.cpp

+ 4
- 1
src/platform/ps3/threadbase.h View File

@@ -126,9 +126,12 @@ class ThreadBase
public:
ThreadBase(void *(*fn)(void *), void *data)
{
size_t stack_size = 128 * 1024;
char const *thread_name = "new thread";

/* FIXME: choose priority more wisely */
sys_ppu_thread_create(&m_thread, (void (*)(uint64_t))fn,
(uint64_t)data, 1000, 0, 0, "new thread");
(uint64_t)data, 1000, stack_size, 0, thread_name);
}

virtual ~ThreadBase()


+ 6
- 1
src/ticker.cpp View File

@@ -314,7 +314,12 @@ void *TickerData::DiskThreadMain(void * /* p */)
{
#if defined __CELLOS_LV2__
/* FIXME: temporary hack to avoid crashes */
for (;;);
Timer t;
for (;;)
{
t.Get();
t.Wait(0.001f);
}
#endif
return NULL;
}


Loading…
Cancel
Save