Howto use init_complete(), wait_for_completion etc.???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

If I do the following under v2.6.21.3:

...
struct completion thread_complete;
init_complete(&thread_complete);

kthread_run(thread_action, (void *)thread_complete, "thread);

wait_for_completion(&thread_complete);
...

...then it waits...
But if thread_action() after a while calls complete(&thread_complete) then I geht an error (something with "__wake_up_common").

So, how should I initialize 'struct completion thread_complete' if I don't want to use DECLARE_COMPLETION() (because thread_complete should be the member of a struct)?

Regards and many thanks for your answers!
Lukas



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux