Conversation
Add real CPU time tracking to the scheduler: - Thread struct gains cpu_ticks_total and owner_pid fields - Scheduler charges elapsed ticks to outgoing thread at context switch - get_process_cpu_ticks() accessor returns per-PID CPU time including in-flight ticks for currently-running threads - All thread creation paths (create_main_thread, fork, clone) set owner_pid Update btop monitor tab to show real CPU%: - Queries scheduler for per-process CPU ticks each refresh cycle - Computes delta-based CPU% with one decimal place (e.g., "1.5%") - Includes heap_size in per-process memory display (code+heap+stack) Update /proc/[pid]/status CpuTicks to read from scheduler instead of the stale process.cpu_ticks field. Add BWM handoff document (docs/planning/BWM_HANDOFF.md) describing architecture for replacing kernel terminal manager with userspace window manager. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add give_back_display syscall (432) that reactivates the kernel terminal manager after userspace releases the display. This enables crash recovery: when BWM dies, init calls give_back_display before respawning. Update sys_fbmmap to return full-screen mapping when userspace has taken over the display via take_over_display, and left-pane-only otherwise. Update init to spawn BWM as primary UI with crash recovery: - Spawns /bin/bwm instead of /bin/bsh directly - Falls back to /bin/bsh after MAX_RAPID_FAILURES BWM crashes - Calls give_back_display on BWM exit to restore kernel terminal Add libbreenix::graphics::give_back_display() wrapper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… switch Adds tracing hooks to ARM64 code paths so SYSCALL_TOTAL, TIMER_TICK_TOTAL, and CTX_SWITCH_TOTAL counters show real values on ARM64 (previously always 0). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BWM Window Manager: - Render BWM on right half only (per-process display ownership via has_display_ownership flag on Process struct) - Left pane reserved for graphics demos (bounce), right pane for BWM - Flush copies offset by x_offset for correct framebuffer positioning - Match kernel terminal_manager colors and tab layout exactly - Font scale 1 for terminal content (compact ~80-col), scale 2 for tabs - Add separator line, padding, and proper terminal area calculation - Fix stair-stepping newlines (LF now implies CR) - Add TIOCSWINSZ to inform PTY children of terminal dimensions - Add mouse click tab switching (poll mouse_state syscall) - Add hit_test_tab_bar for click-to-tab-switch support Kernel fixes: - PTY TCSETS now updates line discipline (was only updating pair.termios, so raw mode never took effect for input processing) - F-keys routed to userspace as VT100 escape sequences when display is inactive (both ARM64 keycode_to_escape_seq and x86_64 scancode_to_fkey_escape) - sys_get_mouse_pos extended to return button state ([x, y, buttons]) - sys_take_over_display sets per-process has_display_ownership flag New programs: - fart: FM audio synthesis tool for Breenix audio subsystem - synth module in libbreenix for audio waveform generation Co-Authored-By: Ryan Breen <rbreen@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TCSETSnow updates the line discipline, so raw mode actually works — shell input and echo functional in BWM.mouse_state()syscall exposes button state; BWM polls for clicks and switches tabs on hit.libbreenix::synthmodule.Test plan
./run.sh— verify BWM renders on right half, bounce demo works on leftbouncefrom BWM shell — verify left-pane graphics demo doesn't crash./docker/qemu/run-aarch64-boot-test-native.sh— verify boot tests pass🤖 Generated with Claude Code