endtask.c
ubixos/types.h
ubixos/sched.h
ubixos/vitals.h
vmm/vmm.h
lib/kprintf.h
isa/8259.h
sys/thread.h
ubixos/sched.h
ubixos/vitals.h
ubixos/types.h
sys/_types.h
vmm/paging.h
ubixos/time.h
vfs/file.h
sys/tss.h
vmm/vmm.h
vfs/vfs.h
vfs/mount.h
lib/kprintf.h
ubixos/ubthread.h
ubixfs/dirCache.h
sys/sysproto.h
sys/signal.h
src/sys/kernel/endtask.c
ubixos/tty.h
sys/io.h
isa/8259.h
void void endTask (pidType pid) endTask pidType pid _current DEAD taskStruct::id sched_setStatus sched_yield __sysctl _int0 _int1 _int10 _int11 _int12 _int2 _int3 _int4 _int5 _int6 _int9 schedEndTask sysExec sysExit vmm_pageFault

    /*****************************************************************************************
    Copyright(c)2002-2004TheUbixOSProject
    Allrightsreserved.

    Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,are
    permittedprovidedthatthefollowingconditionsaremet:

    Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistof
    conditions,thefollowingdisclaimerandthelistofauthors.Redistributionsinbinary
    formmustreproducetheabovecopyrightnotice,thislistofconditions,thefollowing
    disclaimerandthelistofauthorsinthedocumentationand/orothermaterialsprovided
    withthedistribution.NeitherthenameoftheUbixOSProjectnorthenamesofits
    contributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftware
    withoutspecificpriorwrittenpermission.

    THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANY
    EXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF
    MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALL
    THECOPYRIGHTOWNERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,
    SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENT
    OFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,OR
    TORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHIS
    SOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.

    $Id: endtask_8c.xml 88 2016-01-12 00:11:29Z reddawg $

    *****************************************************************************************/

    #include<ubixos/types.h>
    #include<ubixos/sched.h>
    #include<ubixos/vitals.h>
    #include<vmm/vmm.h>
    #include<lib/kprintf.h>
    #include<isa/8259.h>

    /************************************************************************

    Function:endTask(pidTypepid)

    Description:Thiswilldocleanupforanendingtask

    Notes:

    ************************************************************************/
    voidendTask(pidTypepid){
    //kTask_t*tmpTask=0x0;

    /*Don'tmesswithschedulerstructuresfromoutsidethescheduler!*/
    /*Justsetstatustodead,andlettheschedulercleanupitself*/
    sched_setStatus(pid,DEAD);
    //tmpTask=schedFindTask(pid);
    //if(sched_deleteTask(pid)!=0x0)
    //kpanic("sched_deleteTask:Failed\n");
    //kprintf("EndingTask:(%i:0x%X)\n",tmpTask->id,tmpTask);
    //sched_addDelTask(tmpTask);
    //tmpTask->state=DEAD;

    //tmpTask->term->owner=tmpTask->parentPid;

    if(pid==_current->id)
    while(1)
    sched_yield();
    sched_yield();

    return;
    }

    /***
    END
    ***/