F4.2: IPC bloqueante por canal con timeout/deadline#80
Merged
Conversation
Añade canales IPC con buffer FIFO acotado, bloqueo con plazo y latencia acotada (sin busy-wait): - sched.rs: ChanCb (buffer circular CHAN_CAPACITY), estados BlockedRecv/ BlockedSend con block_deadline por tarea, chan_send/chan_recv (no bloqueante con timeout=0, bloqueante con plazo, indefinido con TIMEOUT_FOREVER), wake_one_recv/send (despierta al waiter de mayor prioridad), wake_expired extendido para vencer bloqueos IPC, y limpieza en kill (release_task_sync). - syscall.rs: IDs 0x12 (ChanSend, por valor) y 0x13 (ChanRecv, con out-ptr validado por validate_user_range) + hooks + trampolines SVC userland. - rugus-kernel: hooks chan_send/chan_recv + wrappers cpu_chan_* + sync_selftest extendido (FIFO no bloqueante + Ebusy en vacío). - examples F407/F769: log "sync selftest: PASS (mutex + semaphore + IPC)". - appliance F103: rechaza IPC por canal con Einval (sin multitarea). - host-tests: módulo ipc_tests (FIFO, lleno→Ebusy, send despierta receptor bloqueado, timeout por plazo) + aserciones de dispatch ChanSend/ChanRecv. Validado: F407 y F769 reportan "sync selftest: PASS (mutex + semaphore + IPC)" por RTT; 24 tests host en verde; clippy/doc/fmt limpios en ambos targets. Co-Authored-By: Claude Opus 4.7 <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.
Resumen
Segunda unidad del roadmap F4. Añade canales IPC con bloqueo acotado por plazo (timeout/deadline), sin busy-wait.
CHAN_CAPACITY),chan_send/chan_recvcon tres modos: no bloqueante (timeout=0→Ebusy), bloqueante con plazo (Etimedoutal vencer), e indefinido (TIMEOUT_FOREVER).BlockedRecv/BlockedSend+block_deadlinepor tarea;wake_expiredextendido vence los bloqueos IPC; al despertar se reintenta la operación.wake_one_recv/wake_one_send); limpieza de waiters/propiedad enkill.0x12(ChanSend, por valor) y0x13(ChanRecv, con out-ptr validado víavalidate_user_range) + hooks + trampolines SVC userland.cpu_chan_send/cpu_chan_recvprivilegiados;sync_selftestextendido.Validación
sync selftest: PASS (mutex + semaphore + IPC).ipc_tests: FIFO, lleno→Ebusy, send despierta receptor bloqueado, timeout por plazo).clippy/doc/fmtlimpios en thumbv7em y thumbv7m.Notas de diseño
switch_until_ready) no se prueba en host (elswitch_contextno-op deMockArchno progresaría): los tests cubren la ruta no bloqueante y la contabilidad de despertar/timeout vía accesores*_for_test+wake_expired_for_test.ChanRecves el primer syscall con puntero que ejercita el contrato devalidate_user_rangedocumentado endispatch.🤖 Generated with Claude Code