BeOS Easter Egg - Special Kernel Functions

Two special system calls are defined in "/boot/develop/headers/be/kernel/OS.h" at line 551. One is "is_computer_on()". The other is "is_computer_on_fire()". Programmers can use these function to insure that the computer is on and is not...err...burning. Here is an example program that simply prints the results to the console:
#include <stdio.h>
#include <be/kernel/OS.h>

int main()
printf("%f\n", is_computer_on());
printf("%i\n", is_computer_on_fire());

User Rating:
  7.0/10 with 74 votes
Contributed By: Anonymous on 07-04-2000
Reviewed By: Webmaster
Special Requirements: BeOS R5 (and probably earlier versions)
Please correct this Egg if you see errors.

Pictures and Videos

None posted yet. Send us yours and be the first!


kmag writes:
The code is off a bit. is_computer_on() returns int32 (boolean) and is_computer_on_fire() returns a double, so both of the format strings are wrong in the easter egg. They aren't as silly as they sound. They're used for benchmarking the system call interface. Under Linux, getpid (return the id of the current process) is used for this purpose since it's the fastest system call. Adding such "no-op" system calls to Linux would make benchmarking the system call interface more accurate.
18 of 20 people found this comment helpful. Did you? Yes No
it's me JD writes:
how would the computer know it was on fire apart from the built in thermostat.
5 of 29 people found this comment helpful. Did you? Yes No
qwertyuiop writes:
if this is relevant try "my PC is on fire" on youtube. it is a numa numa parody.
1 of 22 people found this comment helpful. Did you? Yes No

Register - Privacy Policy - About Us - Contact Us