Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • 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
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • kernel
  • workqueue.c
Find file BlameHistoryPermalink
  • Tejun Heo's avatar
    workqueue: make alloc_workqueue() take printf fmt and args for name · b196be89
    Tejun Heo authored Jan 10, 2012
    
    
    alloc_workqueue() currently expects the passed in @name pointer to remain
    accessible.  This is inconvenient and a bit silly given that the whole wq
    is being dynamically allocated.  This patch updates alloc_workqueue() and
    friends to take printf format string instead of opaque string and matching
    varargs at the end.  The name is allocated together with the wq and
    formatted.
    
    alloc_ordered_workqueue() is converted to a macro to unify varargs
    handling with alloc_workqueue(), and, while at it, add comment to
    alloc_workqueue().
    
    None of the current in-kernel users pass in string with '%' as constant
    name and this change shouldn't cause any problem.
    
    [akpm@linux-foundation.org: use __printf]
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Suggested-by: default avatarChristoph Hellwig <hch@infradead.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b196be89
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7