0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.Display;
public class BIOS extends MIDlet{
Kernel kern;
boolean in=false;
public void pauseApp(){
kern.c.println("ACPI : Macine paused");
}
public void destroyApp(boolean b){
kern.c.println("ACPI : Macine poweroffing");
exitApp(true);
}
public void startApp(){
if(!in) kern=new Kernel(this);
else kern.c.println("ACPI : Machine resumed");
in=true;
}
public void exitApp(boolean physical){
Display.getDisplay(this).setCurrent(kern.c);
kern.c.println("Changing runlevel to 0... [Ok]");
kern.c.println("Sending to processes the TERM signal");
kern.c.println("Sending to processes the KILL signal");
kern.c.println("Stopping FS: fsdriver");
kern.fs=null;
kern.c.println("Sending the system clocktime...");
try{
Thread.currentThread().sleep(5000L);kern.c.println("Destroyed.");
Thread.currentThread().sleep(500L);System.gc();}catch(Exception e){}
in=false;
if(physical) notifyDestroyed();
}
}
Очередной кусок говнокода :)
Запостил:
Pyth_ON ,
17.02.2010 (Updated 24.03.2018 )
есть йадро linux ;/
Это типа "Насяника, насяника, масина асьтанавливася"