freemyipod r136 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r135‎ | r136 | r137 >
Date:12:38, 14 August 2010
Author:theseven
Status:new
Tags:
Comment:
Fix getprocessinfo monitor command
Modified paths:
  • /embios/trunk/thread.c (modified) (history)
  • /embios/trunk/usb/usb.c (modified) (history)

Diff [purge]

Index: embios/trunk/thread.c
@@ -265,7 +265,7 @@
266266 last_tick = usec;
267267 for (i = 0; i < MAX_THREADS; i++)
268268 {
269 - scheduler_threads[i].cpuload = scheduler_threads[i].cputime_current / SCHEDULER_TICK;
 269+ scheduler_threads[i].cpuload = 255 * scheduler_threads[i].cputime_current / SCHEDULER_TICK;
270270 scheduler_threads[i].cputime_current = 0;
271271 }
272272 }
Index: embios/trunk/usb/usb.c
@@ -475,7 +475,7 @@
476476 dbgsendbuf[0] = 1;
477477 dbgsendbuf[1] = SCHEDULER_THREAD_INFO_VERSION;
478478 dbgsendbuf[2] = MAX_THREADS * sizeof(struct scheduler_thread);
479 - memcpy(&dbgsendbuf[4], (void*)((uint32_t)scheduler_threads + dbgrecvbuf[1]),
 479+ memcpy(&dbgsendbuf[4], (void*)(((uint32_t)&scheduler_threads) + dbgrecvbuf[1]),
480480 dbgrecvbuf[2]);
481481 size = dbgrecvbuf[2] + 16;
482482 break;