Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1713130

Re: [PATCH] completion: Document that reinit_completion() must be called after complete_all()

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH] completion: Document that reinit_completion() must be called after complete_all()
Date 2017-08-16 19:00 +0200
Message-ID <uf9PI-14p-21@gated-at.bofh.it> (permalink)
References <uf8qC-ju-21@gated-at.bofh.it> <uf9G2-11c-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 16 Aug 2017 09:47:38 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Wed, Aug 16, 2017 at 8:27 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > The function complete_all() modifies the completion "done" variable to
> > UINT_MAX, and no other caller (wait_for_completion(), etc) will modify
> > it back to zero. That means that any call to complete_all() must have a
> > reinit_completion() before that completion can be used again.
> >
> > Document this fact by the complete_all() function.  
> 
> I think this is misleading.
> 
> People reading that comment will just say "why doesn't complete_all()
> just reinit the thing then?"
> 
> So the comment should probably say that it needs to be reinited after
> all the existing completion users have actually woken up, so that it
> explains why the reinit isn't just done by complete_all().
> 

Agreed. I'll send a v2.

Thanks,

-- Steve

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] completion: Document that reinit_completion() must be  called after complete_all() Steven Rostedt <rostedt@goodmis.org> - 2017-08-16 17:30 +0200
  Re: [PATCH] completion: Document that reinit_completion() must be  called after complete_all() Linus Torvalds <torvalds@linux-foundation.org> - 2017-08-16 18:50 +0200
    Re: [PATCH] completion: Document that reinit_completion() must be  called after complete_all() Steven Rostedt <rostedt@goodmis.org> - 2017-08-16 19:00 +0200

csiph-web