2011-06-22 11:26:28

by Murali K. Vemuri

[permalink] [raw]
Subject: threading problem

Hello there,

I have a device driver which provides the IOCTL function for the
application to interact.

when the application sends the IOCTL CMD_GO, my driver has to toggle a
GPIO every 500 m Sec. until a 3 minute timeout occurs or a CMD_STOP
IOCTL is received.

I tried the DECLARE_WORK, DECLARE_DELAYED_WORK and also
kernel_thread() to meet this requirement with no success.

Any help is highly appreciated.

Thanks & regards
Murali


2011-06-22 12:07:03

by Daniel Baluta

[permalink] [raw]
Subject: Re: threading problem

Hello Murali,

> I have a device driver which provides the IOCTL function for the
> application to interact.
>
> when the application sends the IOCTL CMD_GO, my driver has to toggle a
> GPIO every 500 m Sec. until a 3 minute timeout occurs or a CMD_STOP
> IOCTL is received.
>
> I tried the DECLARE_WORK, DECLARE_DELAYED_WORK and also
> kernel_thread() to meet this requirement with no success.
>

Could you please show us the code?

thanks,
Daniel.