On Fri, 2006-05-19 at 12:41 +0900, minchan Kim wrote:
I think they mean that semaphores will cause exclusion (but really, use
mutexes, much easier and they are replacing semaphores), while
completions do not cause exclusion...
eg you can use a mutex to prevent concurrent access (as the code snippet
I gave you before shows), while a completion really doesn't do that.
The book too artifically tries to tie these concepts together by trying
to explain the difference in a micro scale, but that's wrong.
They are ENTIRELY different things. Not even comparable. So saying
"they're different in <this tiny detail>" sort of implies they're
similar constructs in many other ways. They are not. Don't even think
they are.
(having said that, some people used to abuse semaphores to do a
completion type of behavior, which is where the confusion is coming
from, but just don't do that or even focus on that, it's like using the
back of a book to drive a nail in the wall and then ask "what's the
difference between a book and a hammer since I now have both". The
answer is "who cares. Just use the hammer for your own sanity" :)
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.comhttp://selenic.com/mailman/listinfo/kernel-mentors