Age | Commit message (Collapse) | Author |
|
Introduce the 'hw.machine' sysctl variable to represent the current
machine architecture.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Byte count returned must be the number of bytes read() which may be less
than the number of bytes actually requested.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit puts the true hostname of the machine in the OSH prompt
using gethostname()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit adds the POSIX gethostname() and sethostname() functions to
the Hyra C library.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces the 'kern.hostname' sysctl variable to store the
machines hostname.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
When setting sysctl variables from userspace, the 'old' fields will
unused and thus typically be set to NULL. This commit modifies the
behaviour of do_sysctl() to enable this.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Since we are approaching the point to where we'll need to set sysctl
variables from userspace. It would be a wise idea to actually set the
length of the new data.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce the sysctl_clearstr() function to clear string variables that
aren't readonly to a known state.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The strlen() function does not count the null terminator when measuring the
length of the string and therefore a value of 1 must be added to do so.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce two new flags for cat(1)
'-n': number all lines
'-b': number only non-blank lines
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces an initial implementation of the POSIX getopt()
argument parser.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
|
|
A backtrace usually occurs during critcal system events like panics.
When the system in a error state, we cannot trust the correctness of the
stack. This commit aims to improve checks done in a731d4e by adding a
max frame depth that limits how many frames can be walked.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Improve handling within the stacktrace logic used during system panics
and critical events.
- Perform checks on 'rbp' *before* logging
- Ensure RBP is 8-byte aligned
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Improve handling within the stacktrace logic used during system panics
and critical events.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce new SHAPE_SQUARE_BORDER shape type to draw unfilled (bordered)
squares.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Add missing return statement
- Fix x/y mismatch
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit implements the POSIX setsockopt syscall so that user
programs may be able to configure sockets they have created.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit implements proper timeout handling for recv(). Previously,
the recv() syscall would yield the current process forver until data is
available to be read. Obviously, that is not the most ideal as it is not
uncommon for programs to try seeing if any data exists on the socket
before deferring to perform some other task until data arrives.
The basics of how this work is that we try reading data off of some
specified socket. However, if no data is present, we must wait for the
given timeout value before attempting to read again.
While this is pretty effective and works perfectly fine as of now, it
might be worth optimizing this later to allow that timeout period to be
somehow "interrupted" by data arriving at a socket so that the program
does not have to defer execution for the full wait-period.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces the kernel-side implementation of setsockopt()
for setting options on a socket file descriptor. See POSIX
setsockopt() for more information.
https://pubs.opengroup.org/onlinepubs/9690949499/functions/setsockopt.html
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a new sched_suspend() function that allows the caller to
suspend themselves (equivalent to a yield) for a specified amount of
time described by a 'timeval'.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces a new gfx_copy_region() function that
allows a rectangular region of the screen to be defined and its
contents copied to a different part of the screen.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce gfx routine to grab the RGB value of a specific pixel at a
specific location on the screen.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Implement a window cache to avoid the overhead of back-to-back calls for
malloc() and free. This commit additionally introduces a new
oda_shutdown() function for cleaning up the library.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|