public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: kernel_thread() usage found in staging
@ 2009-03-18 13:30 Daniel Krüger
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Krüger @ 2009-03-18 13:30 UTC (permalink / raw)
  To: linux-kernel

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@systec-electronic.com
Internet : http://www.systec-electronic.com

Managing Director   : Dipl.-Phys. Siegmar Schmidt
Commercial registry : Amtsgericht Jena, HRB 205563

^ permalink raw reply	[flat|nested] 3+ messages in thread
* kernel_thread() usage found in staging
@ 2009-03-13  8:26 Peter Teoh
  2009-03-13 21:24 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Teoh @ 2009-03-13  8:26 UTC (permalink / raw)
  To: LKML; +Cc: Greg KH

>From Documentation/feature_removal_schedule.txt, it is well-known that
kernel_thread() API usage is discouraged, but in staging we still
routinely see its use.   Perhaps the original driver owner have
overlooked this?

Thanks.

./rt2870/common/2870_rtmp_init.c:
	pid_number = kernel_thread(MlmeThread, pAd, CLONE_VM);
	pid_number = kernel_thread(RTUSBCmdThread, pAd, CLONE_VM);
	pid_number = kernel_thread(TimerQThread, pAd, CLONE_VM);

./usbip/usbip_common.c:
	retval = kernel_thread(usbip_thread, (void *)&ud->tcp_rx, 0);
	retval = kernel_thread(usbip_thread, (void *)&ud->tcp_tx, 0);

./usbip/usbip_event.c:
	kernel_thread(usbip_thread, (void *)eh, 0);

./epl/ShbIpc-LinuxKernel.c:
	    kernel_thread(ShbIpcThreadSignalNewData, pShbInstance_p,
	    kernel_thread(ShbIpcThreadSignalJobReady, pShbInstance_p,

./epl/EplSdoUdpu.c:
	    kernel_thread(EplSdoUdpThread, &SdoUdpInstance_g, CLONE_KERNEL);


-- 
Regards,
Peter Teoh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-18 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18 13:30 kernel_thread() usage found in staging Daniel Krüger
  -- strict thread matches above, loose matches on Subject: below --
2009-03-13  8:26 Peter Teoh
2009-03-13 21:24 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox