kpanic.c
ubixos/kpanic.h
lib/kprintf.h
isa/8259.h
stdarg.h
ubixos/tty.h
ubixos/kpanic.h
stdarg.h
ubixos/types.h
sys/_types.h
lib/kprintf.h
src/sys/kernel/kpanic.c
ubixos/tty.h
isa/8259.h
void void kpanic (const char *fmt,...) kpanic const char * fmt ...

print panic message and halt system

fmt

panic message

irqDisable
kprintf
NULL
tty_foreground
vaEnd
vaStart
vsprintf
_int0
_int1
_int10
_int11
_int12
_int13
_int2
_int3
_int4
_int5
_int6
_int8
_int9
cpuidDetect
cpuInfo
dp_recv
execFile
execThread
getEmptyDesc
insertFreeDesc
kmain
kmod_load
PCtoNIC
readUbixFS
sched_init
schedNewTask
sysExec
systemTask
tty_change
tty_init
ubixfs_init
ubixfs_thread
ufs_init
vitals_init
vmm_pageFault
vmm_setPageAttributes
vmmCopyVirtualSpace
vmmFindFreePage
vmmGetFreePage
vmmGetFreeVirtualPage

    /*****************************************************************************************
    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: kpanic_8c.xml 88 2016-01-12 00:11:29Z reddawg $

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

    #include<ubixos/kpanic.h>
    #include<lib/kprintf.h>
    #include<isa/8259.h>
    #include<stdarg.h>
    #include<ubixos/tty.h>

    voidkpanic(constchar*fmt,...){
    charbuf[512];
    vaListargs;

    vaStart(args,fmt);
    vsprintf(buf,fmt,args);
    vaEnd(args);

    /*It'simportantthatweprintonthecurrentterminalsolet'sresetforeground*/
    tty_foreground=NULL;
    kprintf("kPanic:%s",buf);

    /*HaltTheSystem*/
    //asm("cli");
    irqDisable(0x0);

    while(1)
    asm("hlt");
    }

    /***
    END
    ***/