renamed Collection.st to Collect.st
This commit is contained in:
		| @ -246,8 +246,7 @@ | ||||
| } | ||||
|  | ||||
|  | ||||
| #include 'Collection.st'. | ||||
| ## #include 'Collec~1.st'. | ||||
| #include 'Collect.st'. | ||||
|  | ||||
| #class(#pointer) CompiledMethod(Object) | ||||
| { | ||||
|  | ||||
| @ -58,13 +58,13 @@ | ||||
| 		s2 := Semaphore new. | ||||
|  | ||||
| 		t1 := [  | ||||
| 			10000 timesRepeat: ['BLOCK #1' dump]. | ||||
| 			100 timesRepeat: ['BLOCK #1' dump]. | ||||
| 			##s2 critical: [ | ||||
| 			##	10 timesRepeat: ['BLOCK #1' dump ] | ||||
| 			##] | ||||
| 		] newProcess. | ||||
| 		t2 := [  | ||||
| 			10000 timesRepeat: ['BLOCK #2' dump]. | ||||
| 			100 timesRepeat: ['BLOCK #2' dump]. | ||||
| 			##s2 critical: [ | ||||
| 			##	10 timesRepeat: ['BLOCK #2' dump. ] | ||||
| 			##]. | ||||
|  | ||||
| @ -90,6 +90,7 @@ | ||||
| 	#define LOAD_ACTIVE_SP(stix) LOAD_SP(stix, (stix)->processor->active) | ||||
| 	#define STORE_ACTIVE_SP(stix) STORE_SP(stix, (stix)->processor->active) | ||||
|  | ||||
| /* TODO: stack bound check when pushing */ | ||||
| 	#define ACTIVE_STACK_PUSH(stix,v) \ | ||||
| 		do { \ | ||||
| 			(stix)->sp = (stix)->sp + 1; \ | ||||
|  | ||||
| @ -45,7 +45,7 @@ | ||||
| #	define INCL_DOSERRORS | ||||
| #	include <os2.h> | ||||
| #elif defined(__MSDOS__) | ||||
| 	/* nothing to include */ | ||||
| #	include <dos.h> | ||||
| #elif defined(macintosh) | ||||
| 	/* nothing to include */ | ||||
| #else | ||||
| @ -386,14 +386,39 @@ stix_ooch_t str_main[] = { 'm', 'a', 'i', 'n' }; | ||||
|  | ||||
| stix_t* g_stix = STIX_NULL; | ||||
|  | ||||
| #if defined(__MSDOS__) && defined(_INTELC32_) | ||||
| static void (*prev_timer_intr_handler) (void); | ||||
|  | ||||
| #pragma interrupt(timer_intr_handler) | ||||
| static void timer_intr_handler (void) | ||||
| { | ||||
| 	/* | ||||
| 	_XSTACK *stk; | ||||
| 	int r; | ||||
| 	stk = (_XSTACK *)_get_stk_frame(); | ||||
| 	r = (unsigned short)stk_ptr->eax;    | ||||
| 	*/ | ||||
|  | ||||
| 	/* The timer interrupt (normally) occurs 18.2 times per second. */ | ||||
| 	if (g_stix) stix_switchprocess (g_stix); | ||||
| 	_chain_intr(prev_timer_intr_handler); | ||||
| } | ||||
|  | ||||
| #else | ||||
| static void arrange_process_switching (int sig) | ||||
| { | ||||
| 	if (g_stix) stix_switchprocess (g_stix); | ||||
| } | ||||
| #endif | ||||
|  | ||||
| static void setup_tick (void) | ||||
| { | ||||
| #if defined(HAVE_SETITIMER) && defined(SIGVTALRM) && defined(ITIMER_VIRTUAL) | ||||
| #if defined(__MSDOS__) && defined(_INTELC32_) | ||||
|  | ||||
| 	prev_timer_intr_handler = _dos_getvect (0x1C); | ||||
| 	_dos_setvect (0x1C, timer_intr_handler); | ||||
|  | ||||
| #elif defined(HAVE_SETITIMER) && defined(SIGVTALRM) && defined(ITIMER_VIRTUAL) | ||||
| 	struct itimerval itv; | ||||
| 	struct sigaction act; | ||||
|  | ||||
| @ -407,12 +432,19 @@ static void setup_tick (void) | ||||
| 	itv.it_value.tv_sec = 0; | ||||
| 	itv.it_value.tv_usec = 100; | ||||
| 	setitimer (ITIMER_VIRTUAL, &itv, STIX_NULL); | ||||
| #else | ||||
|  | ||||
| #	error UNSUPPORTED | ||||
| #endif | ||||
| } | ||||
|  | ||||
| static void cancel_tick (void) | ||||
| { | ||||
| #if defined(HAVE_SETITIMER) && defined(SIGVTALRM) && defined(ITIMER_VIRTUAL) | ||||
| #if defined(__MSDOS__) && defined(_INTELC32_) | ||||
|  | ||||
| 	_dos_setvect (0x1C, prev_timer_intr_handler); | ||||
|  | ||||
| #elif defined(HAVE_SETITIMER) && defined(SIGVTALRM) && defined(ITIMER_VIRTUAL) | ||||
| 	struct itimerval itv; | ||||
| 	struct sigaction act; | ||||
|  | ||||
| @ -427,6 +459,9 @@ static void cancel_tick (void) | ||||
| 	act.sa_handler = SIG_DFL; | ||||
| 	act.sa_flags = 0; | ||||
| 	sigaction (SIGVTALRM, &act, STIX_NULL); | ||||
|  | ||||
| #else | ||||
| #	error UNSUPPORTED | ||||
| #endif | ||||
| } | ||||
|  | ||||
|  | ||||
| @ -54,7 +54,7 @@ | ||||
|  | ||||
| /* this is for gc debugging */ | ||||
| /*#define STIX_DEBUG_PROCESSOR*/ | ||||
| #define STIX_DEBUG_GC_001 | ||||
| /*#define STIX_DEBUG_GC_001*/ | ||||
| /*#define STIX_DEBUG_GC_002*/ | ||||
| #define STIX_DEBUG_COMP_001 | ||||
| /*#define STIX_DEBUG_COMP_002*/ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user