mirror of
https://gitcode.com/JianFeeeee/homeagent-sdk.git
synced 2026-09-20 08:58:03 +00:00
handleHandshake 额外挂载 fd 4(事件环段)+ fd 5(eventfd),启动 evtConsumerLoop goroutine 消费事件。 HandshakeParams 新增 evt_ring_size 字段(0 = 不支持事件环)。 events.subscribe:按类型列表在本地注册 handler,evtConsumerLoop 从 共享段读 slot 后按位索引分发。events.unsubscribe 清空全部 handler。 事件环布局常量与内核 internal/plugin/proc/evtring.go 一一对应。 验证:weather.bin 零改动编译通过;E2E 测试全通过。 Ref: docs/zh/架构迁移评估.md §3.6