moved gcfin_should_exit from Processor to System
This commit is contained in:
@ -4900,7 +4900,7 @@ static MOO_INLINE int switch_process_if_needed (moo_t* moo)
|
||||
{
|
||||
MOO_ASSERT (moo, proc->state == MOO_SMOOI_TO_OOP(PROC_STATE_RUNNABLE));
|
||||
MOO_ASSERT (moo, proc == moo->processor->runnable.first);
|
||||
moo->processor->gcfin_should_exit = moo->_true; /* prepare to inform the gc finalizer process */
|
||||
moo->_system->cvar[2] = moo->_true; /* set gcfin_should_exit in System to true. if the postion of the class variable changes, the index must get changed, too. */
|
||||
switch_to_process_from_nil (moo, proc); /* sechedule the gc finalizer process */
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ static kernel_class_info_t kernel_classes[] =
|
||||
{ 6,
|
||||
{ 'S','y','s','t','e','m' },
|
||||
0,
|
||||
1, /* asyncsg */
|
||||
3, /* asyncsg, gcfin_sem, gcfin_should_exit*/
|
||||
0,
|
||||
0,
|
||||
MOO_OBJ_TYPE_OOP,
|
||||
@ -552,7 +552,6 @@ static int ignite_2 (moo_t* moo)
|
||||
if (!tmp) return -1;
|
||||
moo->processor = (moo_oop_process_scheduler_t)tmp;
|
||||
moo->processor->active = moo->nil_process;
|
||||
moo->processor->gcfin_should_exit = moo->_false;
|
||||
moo->processor->total_count = MOO_SMOOI_TO_OOP(0);
|
||||
moo->processor->runnable.count = MOO_SMOOI_TO_OOP(0);
|
||||
moo->processor->suspended.count = MOO_SMOOI_TO_OOP(0);
|
||||
|
@ -866,14 +866,13 @@ struct moo_semaphore_group_t
|
||||
moo_oop_t sem_count; /* the total number of semaphores in the group */
|
||||
};
|
||||
|
||||
#define MOO_PROCESS_SCHEDULER_NAMED_INSTVARS 9
|
||||
#define MOO_PROCESS_SCHEDULER_NAMED_INSTVARS 8
|
||||
typedef struct moo_process_scheduler_t moo_process_scheduler_t;
|
||||
typedef struct moo_process_scheduler_t* moo_oop_process_scheduler_t;
|
||||
struct moo_process_scheduler_t
|
||||
{
|
||||
MOO_OBJ_HEADER;
|
||||
moo_oop_process_t active; /* pointer to an active process in the runnable process list */
|
||||
moo_oop_t gcfin_should_exit; /* Boolean */
|
||||
moo_oop_t total_count; /* SmallIntger, total number of processes - runnable/running/suspended */
|
||||
|
||||
struct
|
||||
|
Reference in New Issue
Block a user