layer(s): 0 header file(s): z_func.h, z_semaphore.h, z_thread.h, z_unithread.h, z_computer.h synopsis.
"os" is the common computer science abbreviation for "operating system" and this group contains software that relates to operating systems. Although many parts of the Z Directory relate to either 'wordly'conceptualizations, such as businesses and people, the "os" group binds its software tightly to its underlying hardware. Many of the components here have to do with a program (eg, a "process"), and doing things such as creating a process (or threads), initialization, orc getting variables into and out of the OS. There are a cluster of low-level functions (at layer 0) that relate to:
- wrappers around OS API functions;classes in this group: semaphore_o, thread_o, unithread_o, CPU_o, barecomputer_o function groups: layer 00 functions group
- initialization routines;
- the [Microsoft] registry
layer 02 functions group description.
Functions for accessing and operating on the registry exist in layer 0. Since a "registry" is a uniquely Microsoft item, these routines work only on Microsoft environments. There are objects that represent the [rather grand] notion of a computer. The "bare computer object" (barecomputer_o) is a rather simple class object, designed basically to hold personal information about a computer, such as its name or IP [Internet Protocol] address. The prefix "bare" indicates that this is not a full-blown "computer" object - that is reserved for a later date, at a much higher layer. This is because the barecomputer_o class is devoid of disk drive information, and objects such as file systems or disk drives will reside above layer 10. With the bare computer, you can, as usual, create a 'virtual' object that can represent a remote or nonexistant computer, or [via the "sync()" operation] obtain information about the current computer that the object exists in. Getting and setting environment variables can be done via layer 0 and layer 2 subroutines. The latter are easier to use, as they employ string objects for input and output.
z_env() - gets an environment variable.
z_env_to_str() - an alias for z_env().
z_setenv() - sets an environment variable.
z_unsetenv() - removes a variable from the environment.
z_rawenv() - "raw", character buffer based version of z_env(). note.
A "registry" can (and probably should) be implemented in unix environments; but this is a substantial work, requiring politics and decisions. A possible implementation would be to use shared memory, so that all processes can access it, and a file (or database), so that it would retain its permanence between computer shutdowns. If there is no such construct, the alternative is that any objects and/or functions affecting a registry will only work on Microsoft hosts. This option is less attractive to Vettrasoft, as it means that there exist Z Directory operations that do not work the same across all available platforms. Hopefully this will be resolved in future releases. bugs.
the barecomputer_o class has exactly 1 CPU instance - this will probably change in future versions of the Z Directory, as the [more] correct model is that a single computer can (and nowadays often does) have multiple processors.