Skip to content

games: Support supervised loadable game processes. - #3661

Open
aviralgarg05 wants to merge 1 commit into
apache:masterfrom
aviralgarg05:gsoc/games-loadable-modules-pr11
Open

games: Support supervised loadable game processes.#3661
aviralgarg05 wants to merge 1 commit into
apache:masterfrom
aviralgarg05:gsoc/games-loadable-modules-pr11

Conversation

@aviralgarg05

@aviralgarg05 aviralgarg05 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Note: Please adhere to Contributing Guidelines.

Summary

cgol renders forever and has no exit condition of its own, so once started
there was no way to ask it to stop other than killing the task, which can
land in the middle of a framebuffer write.

This adds a SIGTERM handler that only records the request, with the actual
shutdown taken from the render loop where it is safe to unmap and close.
The Kconfig entries for cgol, match4 and snake also become tristate so the
games can be built as loadable modules rather than only into the image.

Impact

  • New feature: The games can be built as loadable modules.
  • User adaptation: NO.
  • Build: The three Kconfig entries become tristate.
  • Hardware: NO.
  • Documentation: NO.
  • Security: NO.
  • Compatibility: Built into the image, behaviour is unchanged apart from
    the game now exiting cleanly on SIGTERM instead of being killed.

Testing

Build host: macOS 26.5, arm64, xtensa-esp-elf-gcc 14.2.0
(esp-14.2.0_20251107).

Target: Xtensa / ESP32-S3, Waveshare ESP32-S3-Touch-LCD-7.

  • nxstyle, tools/checkpatch.sh, codespell and git diff --check
  • built for the target as builtins and as loadable modules
  • on the board, cgol was started, sent SIGTERM, and exited on its own with
    the framebuffer released; ps showed no leftover task afterwards

PR verification Self-Check

  • This PR introduces one focused change.
  • I have updated all required description fields above.
  • I have reviewed and signed every commit.
  • This PR adheres to the current contribution and coding guidelines.
  • My PR is still work in progress.
  • My PR is ready for review and can be safely merged.

@aviralgarg05
aviralgarg05 force-pushed the gsoc/games-loadable-modules-pr11 branch from d7b08fd to 5a8920d Compare August 14, 2026 15:11
@aviralgarg05 aviralgarg05 changed the title [WIP] games: Support supervised loadable game processes. games: Support supervised loadable game processes. Aug 14, 2026
@aviralgarg05
aviralgarg05 marked this pull request as ready for review August 14, 2026 15:14
@aviralgarg05
aviralgarg05 force-pushed the gsoc/games-loadable-modules-pr11 branch from 1a43eda to f9a8113 Compare August 15, 2026 10:02
Comment thread games/cgol/cgol_main.c
Let cgol, match4 and snake build as modules. Handle SIGTERM from cgol's
render loop so it can release the framebuffer cleanly.

Assisted-by: OpenAI Codex:gpt-5.6-sol

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@aviralgarg05
aviralgarg05 force-pushed the gsoc/games-loadable-modules-pr11 branch from f9a8113 to 291da8f Compare August 15, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants