• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revisiona65ce4736e25a838697a1e7c0d6b4cb3da312656 (tree)
Time2023-01-21 21:43:11
Authorphabrics <phabrics@phab...>
Commiterphabrics

Log Message

Fixed sun3 timer interrupt rate calculator.

Change Summary

Incremental Difference

--- a/ic/am9513.c
+++ b/ic/am9513.c
@@ -475,10 +475,10 @@ _tme_am9513_th_timer(struct tme_am9513 *am9513)
475475 tme_log(TME_AM9513_LOG_HANDLE(am9513),
476476 0, TME_OK,
477477 (TME_AM9513_LOG_HANDLE(am9513),
478- "timer %d interrupt rate: %ld/sec",
478+ "timer %d interrupt rate: %ld %ld/sec",
479479 counter_i,
480- (TME_TIME_SET_SEC(counter->tme_am9513_counter_int_sample)
481- / counter->tme_am9513_counter_int_sample_time)));
480+ counter->tme_am9513_counter_int_sample,
481+ TME_TIME_GET_SEC(counter->tme_am9513_counter_int_sample_time)));
482482 }
483483
484484 /* reset the sample: */
--- a/ic/isil7170.c
+++ b/ic/isil7170.c
@@ -91,7 +91,7 @@ _TME_RCSID("$Id: isil7170.c,v 1.6 2010/06/05 14:37:27 fredette Exp $");
9191 /* define this to track interrupt rates, reporting once every N
9292 seconds: */
9393 #if 1
94-#define TME_ISIL7170_TRACK_INT_RATE (10)
94+#define TME_ISIL7170_TRACK_INT_RATE TME_TIME_SET_SEC(10)
9595 #endif
9696
9797 #define TME_ISIL7170_LOG_HANDLE(am) (&(am)->tme_isil7170_element->tme_element_log_handle)
@@ -336,13 +336,13 @@ _tme_isil7170_th_timer(struct tme_isil7170 *isil7170)
336336 0, TME_OK,
337337 (TME_ISIL7170_LOG_HANDLE(isil7170),
338338 "timer interrupt rate: %ld/sec",
339- (isil7170->tme_isil7170_int_sample
340- / (TME_ISIL7170_TRACK_INT_RATE
341- + TME_TIME_GET_SEC(now - isil7170->tme_isil7170_int_sample_time)))));
339+ (TME_TIME_SET_SEC(isil7170->tme_isil7170_int_sample)
340+ / (now - (isil7170->tme_isil7170_int_sample_time - TME_ISIL7170_TRACK_INT_RATE
341+ )))));
342342 }
343343
344344 /* reset the sample: */
345- now += TME_TIME_GET_SEC(TME_ISIL7170_TRACK_INT_RATE);
345+ now += TME_ISIL7170_TRACK_INT_RATE;
346346 isil7170->tme_isil7170_int_sample_time = now;
347347 isil7170->tme_isil7170_int_sample = 0;
348348 }
--- a/machine/sun/tme-make-machs
+++ b/machine/sun/tme-make-machs
@@ -32,6 +32,13 @@
3232
3333 # Default values of various locations to download from/to.
3434
35+# Machines to build in machine_root. Templates come from machine_dir and are
36+# put in directories named after the template files. If unset, default template
37+# directory is <tme_install_prefix>/share/tme/examples.
38+machine_root=./machine
39+machine_dir=
40+machines=
41+
3542 # Firmware downloads for various machines
3643 firmware_root=./sun-fw
3744 firmware_site=https://people.csail.mit.edu/~fredette/tme