]> gitweb.factorcode.org Git - factor.git/blob - core/system/system-docs.factor
b14cb90a6807202f1efc7bac19c3d3d53ae94196
[factor.git] / core / system / system-docs.factor
1 USING: generic help.markup help.syntax kernel math memory
2 namespaces sequences kernel.private strings classes.singleton ;
3 IN: system
4
5 ABOUT: "system"
6
7 ARTICLE: "system" "System interface"
8 { $subsections
9     "cpu"
10     "os"
11 }
12 "Getting the path to the Factor VM and image:"
13 { $subsections
14     vm
15     image
16 }
17 "Getting a monotonically increasing nanosecond count:"
18 { $subsections nano-count }
19 "Exiting the Factor VM:"
20 { $subsections exit } ;
21
22 ARTICLE: "cpu" "Processor detection"
23 "Processor detection:"
24 { $subsections cpu }
25 "Supported processors:"
26 { $subsections
27     x86.32
28     x86.64
29     ppc
30     arm
31 }
32 "Processor families:"
33 { $subsections x86 } ;
34
35 ARTICLE: "os" "Operating system detection"
36 "Operating system detection:"
37 { $subsections os }
38 "Supported operating systems:"
39 { $subsections
40     freebsd
41     linux
42     macosx
43     openbsd
44     netbsd
45     solaris
46     wince
47     winnt
48 }
49 "Operating system families:"
50 { $subsections
51     bsd
52     unix
53     windows
54 } ;
55
56
57 HELP: cpu
58 { $values { "class" singleton-class } }
59 { $description
60     "Outputs a singleton class with the name of the current CPU architecture."
61 } ;
62
63 HELP: os
64 { $values { "class" singleton-class } }
65 { $description
66     "Outputs a singleton class with the name of the current operating system family."
67 } ;
68
69 HELP: embedded?
70 { $values { "?" "a boolean" } }
71 { $description "Tests if this Factor instance is embedded in another application." } ;
72
73 HELP: exit ( n -- )
74 { $values { "n" "an integer exit code" } }
75 { $description "Exits the Factor process." } ;
76
77 HELP: nano-count ( -- ns )
78 { $values { "ns" integer } }
79 { $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." }
80 { $notes "This is a low-level word. The " { $vocab-link "tools.time" } " vocabulary defines words to time code execution time." } ;
81
82 HELP: image
83 { $values { "path" "a pathname string" } }
84 { $description "Outputs the pathname of the currently running Factor image." } ;
85
86 HELP: vm
87 { $values { "path" "a pathname string" } }
88 { $description "Outputs the pathname of the currently running Factor VM." } ;