renamed Collection.st to Collect.st
This commit is contained in:
parent
38ccdbed9d
commit
04ccebe9b4
@ -246,8 +246,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include 'Collection.st'.
|
#include 'Collect.st'.
|
||||||
## #include 'Collec~1.st'.
|
|
||||||
|
|
||||||
#class(#pointer) CompiledMethod(Object)
|
#class(#pointer) CompiledMethod(Object)
|
||||||
{
|
{
|
||||||
|
@ -58,13 +58,13 @@
|
|||||||
s2 := Semaphore new.
|
s2 := Semaphore new.
|
||||||
|
|
||||||
t1 := [
|
t1 := [
|
||||||
10000 timesRepeat: ['BLOCK #1' dump].
|
100 timesRepeat: ['BLOCK #1' dump].
|
||||||
##s2 critical: [
|
##s2 critical: [
|
||||||
## 10 timesRepeat: ['BLOCK #1' dump ]
|
## 10 timesRepeat: ['BLOCK #1' dump ]
|
||||||
##]
|
##]
|
||||||
] newProcess.
|
] newProcess.
|
||||||
t2 := [
|
t2 := [
|
||||||
10000 timesRepeat: ['BLOCK #2' dump].
|
100 timesRepeat: ['BLOCK #2' dump].
|
||||||
##s2 critical: [
|
##s2 critical: [
|
||||||
## 10 timesRepeat: ['BLOCK #2' dump. ]
|
## 10 timesRepeat: ['BLOCK #2' dump. ]
|
||||||
##].
|
##].
|
||||||
|
@ -90,6 +90,7 @@
|
|||||||
#define LOAD_ACTIVE_SP(stix) LOAD_SP(stix, (stix)->processor->active)
|
#define LOAD_ACTIVE_SP(stix) LOAD_SP(stix, (stix)->processor->active)
|
||||||
#define STORE_ACTIVE_SP(stix) STORE_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) \
|
#define ACTIVE_STACK_PUSH(stix,v) \
|
||||||
do { \
|
do { \
|
||||||
(stix)->sp = (stix)->sp + 1; \
|
(stix)->sp = (stix)->sp + 1; \
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
# define INCL_DOSERRORS
|
# define INCL_DOSERRORS
|
||||||
# include <os2.h>
|
# include <os2.h>
|
||||||
#elif defined(__MSDOS__)
|
#elif defined(__MSDOS__)
|
||||||
/* nothing to include */
|
# include <dos.h>
|
||||||
#elif defined(macintosh)
|
#elif defined(macintosh)
|
||||||
/* nothing to include */
|
/* nothing to include */
|
||||||
#else
|
#else
|
||||||
@ -386,14 +386,39 @@ stix_ooch_t str_main[] = { 'm', 'a', 'i', 'n' };
|
|||||||
|
|
||||||
stix_t* g_stix = STIX_NULL;
|
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)
|
static void arrange_process_switching (int sig)
|
||||||
{
|
{
|
||||||
if (g_stix) stix_switchprocess (g_stix);
|
if (g_stix) stix_switchprocess (g_stix);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void setup_tick (void)
|
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 itimerval itv;
|
||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
|
|
||||||
@ -407,12 +432,19 @@ static void setup_tick (void)
|
|||||||
itv.it_value.tv_sec = 0;
|
itv.it_value.tv_sec = 0;
|
||||||
itv.it_value.tv_usec = 100;
|
itv.it_value.tv_usec = 100;
|
||||||
setitimer (ITIMER_VIRTUAL, &itv, STIX_NULL);
|
setitimer (ITIMER_VIRTUAL, &itv, STIX_NULL);
|
||||||
|
#else
|
||||||
|
|
||||||
|
# error UNSUPPORTED
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cancel_tick (void)
|
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 itimerval itv;
|
||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
|
|
||||||
@ -427,6 +459,9 @@ static void cancel_tick (void)
|
|||||||
act.sa_handler = SIG_DFL;
|
act.sa_handler = SIG_DFL;
|
||||||
act.sa_flags = 0;
|
act.sa_flags = 0;
|
||||||
sigaction (SIGVTALRM, &act, STIX_NULL);
|
sigaction (SIGVTALRM, &act, STIX_NULL);
|
||||||
|
|
||||||
|
#else
|
||||||
|
# error UNSUPPORTED
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
/* this is for gc debugging */
|
/* this is for gc debugging */
|
||||||
/*#define STIX_DEBUG_PROCESSOR*/
|
/*#define STIX_DEBUG_PROCESSOR*/
|
||||||
#define STIX_DEBUG_GC_001
|
/*#define STIX_DEBUG_GC_001*/
|
||||||
/*#define STIX_DEBUG_GC_002*/
|
/*#define STIX_DEBUG_GC_002*/
|
||||||
#define STIX_DEBUG_COMP_001
|
#define STIX_DEBUG_COMP_001
|
||||||
/*#define STIX_DEBUG_COMP_002*/
|
/*#define STIX_DEBUG_COMP_002*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user