2014-09-19 10:31:14 -04:00
USING: classes.singleton help.markup help.syntax init kernel math ;
2007-09-20 18:09:08 -04:00
IN: system
2008-04-02 20:23:26 -04:00
ABOUT: "system"
ARTICLE: "system" "System interface"
2009-10-01 15:56:36 -04:00
{ $subsections
"cpu"
"os"
}
2007-09-20 18:09:08 -04:00
"Getting the path to the Factor VM and image:"
2009-10-01 15:56:36 -04:00
{ $subsections
vm
image
}
2009-11-18 17:33:10 -05:00
"Getting a monotonically increasing nanosecond count:"
{ $subsections nano-count }
2007-09-20 18:09:08 -04:00
"Exiting the Factor VM:"
2009-10-01 15:56:36 -04:00
{ $subsections exit } ;
2007-09-20 18:09:08 -04:00
2008-04-09 01:32:18 -04:00
ARTICLE: "cpu" "Processor detection"
2008-04-02 20:23:26 -04:00
"Processor detection:"
2009-10-01 15:56:36 -04:00
{ $subsections cpu }
2008-04-02 20:23:26 -04:00
"Supported processors:"
2009-10-01 15:56:36 -04:00
{ $subsections
x86.32
x86.64
ppc
arm
}
2008-04-02 20:23:26 -04:00
"Processor families:"
2009-10-01 15:56:36 -04:00
{ $subsections x86 } ;
2008-04-02 20:23:26 -04:00
2008-04-09 01:32:18 -04:00
ARTICLE: "os" "Operating system detection"
2008-04-02 20:23:26 -04:00
"Operating system detection:"
2009-10-01 15:56:36 -04:00
{ $subsections os }
2008-04-02 20:23:26 -04:00
"Supported operating systems:"
2009-10-01 15:56:36 -04:00
{ $subsections
linux
macosx
2011-09-18 21:25:06 -04:00
windows
2009-10-01 15:56:36 -04:00
}
2008-04-02 20:23:26 -04:00
"Operating system families:"
2009-10-01 15:56:36 -04:00
{ $subsections
unix
windows
} ;
2008-04-02 20:23:26 -04:00
2007-09-20 18:09:08 -04:00
HELP: cpu
2008-04-02 20:23:26 -04:00
{ $values { "class" singleton-class } }
2007-09-20 18:09:08 -04:00
{ $description
2008-04-02 20:23:26 -04:00
"Outputs a singleton class with the name of the current CPU architecture."
2007-09-20 18:09:08 -04:00
} ;
HELP: os
2008-04-02 20:23:26 -04:00
{ $values { "class" singleton-class } }
2007-09-20 18:09:08 -04:00
{ $description
2008-04-02 20:23:26 -04:00
"Outputs a singleton class with the name of the current operating system family."
2007-09-20 18:09:08 -04:00
} ;
HELP: embedded?
2014-05-23 23:20:15 -04:00
{ $values { "?" boolean } }
2007-09-20 18:09:08 -04:00
{ $description "Tests if this Factor instance is embedded in another application." } ;
2011-10-20 22:36:11 -04:00
HELP: exit
2007-09-20 18:09:08 -04:00
{ $values { "n" "an integer exit code" } }
2014-09-19 10:31:14 -04:00
{ $description "Runs all " { $link shutdown-hooks } " and then exits the Factor process. If an error occurs when the shutdown hooks runs, or when the process is about to terminate, the error is ignored and the process exits with status 255." } ;
2007-09-20 18:09:08 -04:00
2011-10-20 22:36:11 -04:00
HELP: nano-count
2009-11-18 17:33:10 -05:00
{ $values { "ns" integer } }
{ $description "Outputs a monotonically increasing count of nanoseconds elapsed since an arbitrary starting time. The difference of two calls to this word allows timing. This word is unaffected by system clock changes." }
2010-06-22 02:49:11 -04:00
{ $notes "This is a low-level word. The " { $vocab-link "tools.time" } " vocabulary defines words to time code execution time." } ;
2009-11-18 17:33:10 -05:00
2007-09-20 18:09:08 -04:00
HELP: image
{ $values { "path" "a pathname string" } }
{ $description "Outputs the pathname of the currently running Factor image." } ;
HELP: vm
{ $values { "path" "a pathname string" } }
{ $description "Outputs the pathname of the currently running Factor VM." } ;