Commit Graph

91 Commits

Author SHA1 Message Date
wash 278fe39c0d vm: implement private and shared address space mappings
whether a mapping is private or shared determines how the mapping is handled
when a task is duplicated.
2026-04-21 21:12:00 +01:00
wash c105e17be9 kernel: printk: keep log_buffer_lock locked while flushing printk buffer 2026-04-19 20:08:29 +01:00
wash f1dd9d8564 kernel: handle: init handle table duplication 2026-04-19 20:07:51 +01:00
wash 512356ac2d sched: enforce ref-counting on current task/thread pointers 2026-04-01 18:17:05 +01:00
wash 9001f8e064 kernel: handle: rename handle transfer mode constants 2026-03-29 11:48:31 +01:00
wash 537242e606 kernel: handle: add support for allocating a specific handle value 2026-03-29 11:47:22 +01:00
wash f5a83af0d7 kernel: remove SEND_BLOCKED and REPLY_BLOCKED statuses from ports
this allows a port to be used by multiple threads at the same time
2026-03-29 11:42:23 +01:00
wash 95d33ddcb9 kernel: msg: async messages no longer hold a pointer to the thread/port that sent them
this prevents a race condition where an event is sent as a port is being destroyed.
when the server gets around to handling the event, it now refers to a different port
that was created in the mean-time.
2026-03-25 20:19:19 +00:00
wash 7dc0c742fa kernel: rebuild object ref-counting using atomic types 2026-03-24 19:10:36 +00:00
wash 89d02c72ee kernel: msg: implement asynchronous event messages 2026-03-24 18:32:33 +00:00
wash 2a1a0cf14d kernel: finish implementation of private and shared futexes 2026-03-18 21:02:09 +00:00
wash 04d05adbe8 kernel: handle: implement handle_table_destroy() 2026-03-18 20:55:35 +00:00
wash 1eef23ea98 thread: store struct msg on the stack instead of in the thread 2026-03-18 20:52:47 +00:00
wash 30c9c9db45 kernel: add futex definitions 2026-03-15 22:22:58 +00:00
wash 62bdb51618 kernel: add functions to lock/unlock a pair of locks without saving irq flags 2026-03-14 22:25:15 +00:00
wash 5e7a467dff kernel: printk: fix log buffer overflow 2026-03-14 22:16:01 +00:00
wash c628390f4a vm: replace vm-region with address-space
address-space is a non-recursive data structure, which contains a flat list of vm_areas representing
mapped vm-objects.

userspace programs can no longer create sub-address-spaces. instead, they can reserve portions of
the address space, and use that reserved space to create mappings.
2026-03-13 19:44:50 +00:00
wash 5a37b5e148 kernel: handle: handle_table_transfer now ignores items with KERN_HANDLE_INVALID 2026-03-12 20:41:01 +00:00
wash 2fb8f556b4 kernel: implement a generic object signalling system 2026-03-12 20:40:23 +00:00
wash 3fd608b623 kernel: add equeue object
equeue is a way for the kernel to deliver events to userspace programs.
2026-03-12 20:37:51 +00:00
wash 3f21e888d6 sched: split sched.h into separate header files 2026-03-12 20:30:36 +00:00
wash e84ed6057d channel: fix incorrect offset used in channel_write_msg 2026-03-10 19:08:20 +00:00
wash 18b281debf kernel: bsp: add support for static bootstrap executables 2026-03-06 20:12:12 +00:00
wash 09d292fd09 kernel: msg: include details about who sent a message 2026-03-05 21:04:02 +00:00
wash 36c5ac7837 kernel: re-implement sending handles via port messages 2026-03-01 19:10:01 +00:00
wash e4de3af00d kernel: remove support for sending kernel handles via port/channel 2026-02-26 20:53:47 +00:00
wash 8cc877c251 kernel: port: dequeue kmsg struct once reply is received 2026-02-26 19:42:29 +00:00
wash 2073cad97b kernel: fix channel locking and status update issues 2026-02-26 19:42:12 +00:00
wash 1cdde0d32e kernel: add functions for safely (un)locking pairs of objects
when locking a pair of objects, the object with the lesser memory address
is always locked first. the pair is unlocked in the opposite order.
2026-02-26 19:38:49 +00:00
wash 1c7c90ef39 kernel: channel: implement channel_read_msg and msg_read 2026-02-23 21:52:03 +00:00
wash fd1bc0ad5f kernel: check object refcount before performing a recursive deletion 2026-02-23 18:43:11 +00:00
wash 5690dd5b9c kernel: add support for recursive object destruction (without recursion)
this system makes it possible for an object that forms part of a tree
to be safely recursively destroyed without using recursion.
2026-02-23 18:34:12 +00:00
wash 37ae7aeef7 kernel: implement globally-unique object ids 2026-02-23 18:32:11 +00:00
wash 044b3688aa vm: cache: all allocations are now zero-initialised 2026-02-21 23:18:09 +00:00
wash 77936e3511 kernel: implement sending, receiving, and replying to message via port/channel 2026-02-21 11:32:57 +00:00
wash 0680b73461 kernel: iovec: implement iterating through an iovec list stored in userspace 2026-02-21 11:17:16 +00:00
wash aa9439c392 kernel: add channel/port ipc mechanism 2026-02-19 19:21:04 +00:00
wash 8e072945d8 kernel: add functions for moving sets of handles between tasks 2026-02-19 19:20:39 +00:00
wash 821246bc16 kernel: add functions for iterating through an array of iovecs 2026-02-19 19:19:52 +00:00
wash fc8cdf62d3 bsp: adjust bsp executable mapping 2026-02-19 19:18:31 +00:00
wash f2e128c57e handle: re-arrange handle space layout
the lowest 2 bits of handle values are no longer unused, and 0 is
now a valid handle value.

the first 64 handles are now reserved, and will not be automatically
allocated by the kernel. however, they are still valid handles, and
other handles can be moved to this area using an as-yet-unwritten
function. this is to allow support for standard POSIX file descriptors,
which require the values 0, 1, and 2.
2026-02-19 19:11:11 +00:00
wash c6e1ba21dd vm: implement direct read/write/copy access to vm-object memory 2026-02-19 19:09:38 +00:00
wash 2f413c603d kernel: all string parameters now take a corresponding length parameter 2026-02-19 19:08:17 +00:00
wash 291a5f677e sched: implement passing arguments to user-mode threads 2026-02-19 19:05:53 +00:00
wash 6019c9307d kernel: separate headers into kernel and user headers
all kernel headers have been moved from include/mango to include/kernel
and include definitions that are only relevant to kernel-space.

any definitions that are relevant to both kernel- and user-space
(i.e. type definitions, syscall IDs) have been moved to
include/mango within libmango.
2026-02-19 18:54:48 +00:00
wash 9f7b7bdd2d kernel: refactor syscall dispatch system 2026-02-08 16:17:11 +00:00
wash c424e8127e kernel: bsp: update vm-region api usage 2026-02-08 15:52:04 +00:00
wash 409725f9d4 kernel: implementing mapping and execution of bsp executable 2026-02-08 13:13:03 +00:00
wash 1c74291b99 kernel: add a temporary syscall dispatch system 2026-02-08 13:12:24 +00:00
wash 14ebcd4875 kernel: implement object handle tables 2026-02-08 12:55:47 +00:00