Example #1
0
void terminate(){
	// resetSegments();
	setKernelDataSegment();
	releasePCB(running);
	restoreDataSegment();
	setKernelDataSegment();
	releaseMemorySegment((*running).segment);
	restoreDataSegment();
	while(1 == 1){}
}
Example #2
0
void terminate(){
    struct PCB *pcb;
    
    setKernelDataSegment();
    pcb = running;
    restoreDataSegment();
    
    setKernelDataSegment();
    releaseMemorySegment(pcb->segment);
    releasePCB(pcb);
    restoreDataSegment();

//    resetSegments();
//    printString("I'm back!");
    interrupt(0x21, 0x04, "shell\0", 0x2000, 0);
}