On Thu, 20 Jun 2002, Jan Hudec wrote: > On Wed, Jun 19, 2002 at 12:50:14PM -0400, Alan Stern wrote: > > What are the essential differences between a struct completion and a > > semaphore? When is it more appropriate to use one rather than the other? > > Semaphores are for mutual exclusion. Completions are for waiting on events > (I have not seen completitions used yet. Usualy wait queues are used > directly or via wait_on_event macro). One place where completions are used is in the usb-storage driver: linux/drivers/usb/storage/usb.c and related files. But you didn't answer my first question. What are the essential differences between a struct completion and a semaphore? Alan Stern -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/