→ (or/c symbol? string? bytes? exact-positive-integer? vector? #f)
(or/c 'os 'word 'vm 'gc 'link 'machine 'target-machine 'so-suffix 'so-mode 'fs-change 'cross) = 'os
See Racket Virtual Machine Implementations for more information about the 'vm and 'gc mode results.
when (system-type 'vm) is 'racket
when (system-type 'vm) is 'racket
when (system-type 'vm) is 'chez-scheme
Future ports of Racket may expand the list of 'os, 'vm, 'gc, and 'link results.
In 'target-machine mode, the result is a symbol for the running Racket’s native bytecode format, or it is #f if there is no native format other than the machine-independent format. If the result is a symbol, then compile-target-machine? returns #t when applied to the symbol; see also current-compile-target-machine.
In 'so-suffix mode, then the result is a byte string that represents the file extension used for shared objects on the current platform. The byte string starts with a period, so it is suitable as a second argument to path-replace-suffix.
In 'fs-change mode, the result is an immutable vector of four elements. Each element is either #f or a symbol, where a symbol indicates the presence of a property and #f indicates the absence of a property. The possible symbols, in order, are:
resources consumed by a filesystem change event are effectively limited only by available memory, as opposed to file-descriptor limits; this property is #f on Mac OS and BSD variants of Unix
creation and checking of a filesystem change event is practically instantaneous; this property is #f on Linux
a filesystem change event can track changes at the level of a file, as opposed to the file’s directory; this property is #f on Windows
In 'cross mode, the result reports whether cross-platform build mode has been selected (through the -C or --cross argument to racket; see Command Line). The possible symbols are:
Changed in version 188.8.131.52 of package base: Added 'vm mode.
Changed in version 184.108.40.206: Added 'cross mode.
Changed in version 220.127.116.11: Added 'target-machine mode.
On Unix and Mac OS, the string is five characters: two lowercase ASCII letters for the language, an underscore, and two uppercase ASCII letters for the country. On Windows, the string can be arbitrarily long, but the language and country are in English (all ASCII letters or spaces) separated by an underscore.
On Unix, the result is determined by checking the LC_ALL, LC_TYPE, and LANG environment variables, in that order (and the result is used if the environment variable’s value starts with two lowercase ASCII letters, an underscore, and two uppercase ASCII letters, followed by either nothing or a period). On Windows and Mac OS, the result is determined by system calls.
The optional mode argument specifies the relevant garbage-collection variant, which one of the possible results of (system-type 'gc): 'cgc, '3m, or 'cs. It can also be #f, in which case the result is independent of the garbage-collection variant.
Installation tools should use cross-system-library-subpath, instead, to support cross-installation.
Changed in version 7.0 of package base: Added 'cs mode.
→ (vectorof (and/c string? immutable?)) (current-command-line-arguments argv) → void? argv : (vectorof string?)
On Unix and Mac OS, command-line arguments are provided to the Racket process as byte strings. The arguments are converted to strings using bytes->string/locale and #\uFFFD as the encoding-error character.
(current-thread-initial-stack-size size) → void? size : exact-positive-integer?
For global statistics, up to 12 elements are set in the vector, starting from the beginning. If results has n elements where n < 12, then the n elements are set to the first n performance-statistics values. The reported statistics values are as follows, in the order that they are set within results:
0: The same value as returned by current-process-milliseconds.
1: The same value as returned by current-milliseconds.
2: The same value as returned by current-gc-milliseconds.
3: The number of garbage collections performed since start-up within the current place.
4: The number of thread context switches performed since start-up.
5: The number of internal stack overflows handled since start-up.
6: The number of threads currently scheduled for execution (i.e., threads that are running, not suspended, and not unscheduled due to a synchronization).
7: The number of syntax objects read from compiled code since start-up.
10: The number of bytes allocated for machine code that is not reported by current-memory-use.
11: The peak number of allocated bytes just before a garbage collection.
For thread-specific statistics, up to 4 elements are set in the vector:
0: #t if the thread is running, #f otherwise (same result as thread-running?).
1: #t if the thread has terminated, #f otherwise (same result as thread-dead?).
2: #t if the thread is currently blocked on a synchronizable event (or sleeping for some number of milliseconds), #f otherwise.
3: The number of bytes currently in use for the thread’s continuation.
Changed in version 18.104.22.168 of package base: Added vector position 11 for global statistics.