Re: how can i make the skeleton read function blocking function?

"Wael Adel" <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On 4/24/07, Oliver Neukum <[email protected]> wrote:
> Am Dienstag, 24. April 2007 14:58 schrieb Wael Adel:
> > Dear Oliver forgive me for my many questions but here are the
>
> No problem. Only those who refuse to ask are foolish.
>
> > modificaions that u adviced me to do but i think there is still
> > something wrong because when the gadget sends "hello" for example to
> > the host, my computer is hanging so what is the error ,i m gonna be
> > made:
> >
> > here is the last code for skel_read:
> >
> >
> > static void skel_read_bulk_callback(struct urb *urb, struct pt_regs *regs)
> > {
> >         struct usb_skel *dev;
> >         complete((struct completion *)urb->context);
> >         dev = (struct usb_skel *)urb->context;
> >         up(&dev->limit_sem);
> > }
>
> Sorry, I made a mistake. In the completion handler you need both the pointer
> to dev and done. Consequently you need to pass a pointer to a struct that
> contains them.

so i have to make a structure mydata {struct completion done;struct
usb_skel *dev;};
then pass a pointer to the mydata structure to the last argument of
the function of usb__fill_bulk_urb? is it what u mean excactly?


> 	HTH
> 		Oliver
> --
> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
> This signature is a legal requirement
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.