Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O Oops-Os
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • 对不队
  • Oops-Os
  • Merge requests
  • !3

feat: 完善信号量语义并新增AND信号量与对比测试

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged 对不队 requested to merge process into main Dec 30, 2025
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 17

功能说明

  • 完善单信号量语义:允许 0 初值、修正 P/V 的阻塞与唤醒语义、释放时检查等待者
  • 增加 AND 信号量接口 sem_p_multi,支持原子申请多个信号量,避免死锁
  • 新增/扩展测试:semtest 覆盖边界与并发场景;semandtest 展示“无 AND 易死锁 / 有 AND 可完成”
  • 将 semtest 与 semandtest 纳入 usertests 自动测试集
  • 同步更新进程管理与系统调用文档、开发日志

关键改动

  • 内核:kernel/sysproc.c、kernel/syscall.c、kernel/include/syscall.h、kernel/include/spinlock.h、kernel/lock/spinlock.c
  • 用户态:user/user.h、user/usys.pl、user/usys.S
  • 测试:user/test/semtest.c、user/test/semandtest.c、user/test/usertests.c
  • 文档:docs/document/进程管理.md、docs/document/系统调用.md、开发日志.md

测试情况

  • semtest(手动)
  • semandtest(手动)
  • usertests(包含上述两项)
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: process