Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • K kvmtool-dm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • kvmtool-dm
  • Repository
  • kvmtool-dm
  • include
  • kvm
  • threadpool.h
Find file BlameHistoryPermalink
  • Jean-Philippe Brucker's avatar
    threadpool: Add cancel() function · 7a7f4542
    Jean-Philippe Brucker authored Jan 10, 2019
    
    
    When resetting a virtqueue, it is often necessary to make sure that the
    associated threadpool job isn't running anymore. Add a function to
    cancel a job.
    
    A threadpool job has three states: idle, queued and running. A job is
    queued when it is in the job list. It is running when it is out the
    list, but its signal count is greater than zero. It is idle when it is
    both out of the list and its signal count is zero. The cancel() function
    simply waits for the job to be idle. It is up to the caller to make sure
    that the job isn't queued concurrently.
    
    Signed-off-by: Jean-Philippe Brucker's avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
    Signed-off-by: default avatarJulien Thierry <julien.thierry@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    7a7f4542