Re: kernel_thread() usage found in staging

From: Daniel Krüger
Date: Wed Mar 18 2009 - 10:04:22 EST


Hello,

sorry for stepping in. I found the original posting via Google while trying to compile the openPOWERLINK protocol stack with a recent Linux kernel. I am the official maintainer of openPOWERLINK.

> ./epl/ShbIpc-LinuxKernel.c:
> kernel_thread(ShbIpcThreadSignalNewData, pShbInstance_p,
> kernel_thread(ShbIpcThreadSignalJobReady, pShbInstance_p,
>
> ./epl/EplSdoUdpu.c:
> kernel_thread(EplSdoUdpThread, &SdoUdpInstance_g, CLONE_KERNEL);

As I understand, there are some issues (race conditions) with the kthread-API and signals. I need signals, because the kernel-threads may block in some I/O functions.

What is the right way to use the kthread-API with signals? Or are there any solutions to avoid signals?
Is there any sample code that shows how to do it?

Thanks in advance for any help.

Regards,
Daniel Krüger

--
SYS TEC electronic GmbH
August-Bebel-Str. 29
D-07973 Greiz

Telefon : +49 (0) 3661 6279 0
Fax : +49 (0) 3661 6279 99
Email : daniel.krueger@xxxxxxxxxxxxxxxxxxxxx
Internet : http://www.systec-electronic.com

Managing Director : Dipl.-Phys. Siegmar Schmidt
Commercial registry : Amtsgericht Jena, HRB 205563
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/