- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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();
}
}
guest 17.02.2010 17:13 # 0
Pyth_ON 17.02.2010 17:17 # 0
есть йадро linux ;/
guest 17.02.2010 17:59 # 0
Pyth_ON 17.02.2010 18:10 # 0
Dreyk 17.02.2010 17:37 # 0
Это типа "Насяника, насяника, масина асьтанавливася"
Pyth_ON 17.02.2010 18:11 # 0
danilissimus 17.02.2010 19:33 # +1
Pyth_ON 17.02.2010 20:07 # +2
guest 17.02.2010 22:04 # 0
guest 18.02.2010 08:59 # −2
ccoder 02.03.2010 10:51 # 0
guest 02.03.2010 15:02 # 0