Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 567 → Rev 568

/shark/trunk/kernel/kern.c
18,11 → 18,11
 
/**
------------
CVS : $Id: kern.c,v 1.11 2004-04-18 20:18:21 giacomo Exp $
CVS : $Id: kern.c,v 1.12 2004-04-19 12:36:39 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.11 $
Last update: $Date: 2004-04-18 20:18:21 $
Revision: $Revision: 1.12 $
Last update: $Date: 2004-04-19 12:36:39 $
------------
 
This file contains:
577,10 → 577,6
they have the cancelability set to deferred) when the system goes to
runlevel 3 */
 
struct timespec t = {SYSTEM_CLOSE_TIMEOUT,0};
 
kern_event_post(&t,(void *)((void *)sys_abort),NULL);
 
//kern_printf("Û%lu",kern_gettime(NULL));
kill_user_tasks();
//kern_printf("Û%lu",kern_gettime(NULL));
598,9 → 594,6
event_setlasthandler(NULL);
}
 
 
 
 
/*
* Runlevel BEFORE_EXIT: Before Halting the system
*
609,7 → 602,6
 
runlevel = RUNLEVEL_BEFORE_EXIT;
 
 
/* the field global_errnumber is
=0 if the system normally ends
!=0 if an abort is issued
624,7 → 616,6
/* Shut down the VM layer */
ll_end();
 
 
/*
* Runlevel AFTER_EXIT: After halting...
*
668,7 → 659,6
 
global_errnumber = i;
 
 
if (!ll_ActiveInt()) {
proc_table[exec_shadow].context = kern_context_save();
702,8 → 692,8
 
/*
Close the system & return to HOST OS.
Can be called from tasks and from ISRS
 
Can be called from tasks and from ISRS,
but only during runlevel SHUTDOWN
*/
void sys_abort(int err)
710,11 → 700,30
{
SYS_FLAGS f;
 
/* Check if the system is in RUNNING mode */
if (runlevel != RUNLEVEL_RUNNING) return;
 
f = kern_fsave();
internal_sys_end(err);
kern_frestore(f);
 
}
 
/* Close the system when we are in runlevel shutdown */
void sys_abort_shutdown(int err)
{
SYS_FLAGS f;
/* Check if the system is in SHUTDOWN mode */
if (runlevel != RUNLEVEL_SHUTDOWN) return;
f = kern_fsave();
internal_sys_end(err);
kern_frestore(f);
 
}
 
 
void sys_end(void)
{
sys_abort(0);
/shark/trunk/kernel/grpcreat.c
18,11 → 18,11
 
/**
------------
CVS : $Id: grpcreat.c,v 1.8 2004-04-18 18:59:28 giacomo Exp $
CVS : $Id: grpcreat.c,v 1.9 2004-04-19 12:36:39 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.8 $
Last update: $Date: 2004-04-18 18:59:28 $
Revision: $Revision: 1.9 $
Last update: $Date: 2004-04-19 12:36:39 $
------------
 
This file contains:
306,9 → 306,9
//kern_printf("[c%i %i]",i,proc_table[i].context);
/* Count the task if it is an Application or System Task... */
if (m->control & SYSTEM_TASK)
if (!(m->control & SYSTEM_TASK))
task_counter++;
else if (m->control & NO_KILL)
else if (!(m->control & NO_KILL))
system_counter++;
 
return 0;