Am Freitag, 2. Januar 2004 01:06 schrieb don:
> In both 2.4.23 and 2.6.0, usbdevice_fs.h has:
> 
> struct usbdevfs_urb {
>       ...
>       unsigned int signr;  /* signal to be sent on error, -1 if none should be sent 
> */
>       ...
>       
> Yet devio.c has:
> 
> static int proc_submiturb(struct dev_state *ps, void *arg)
> {
>         ...
>         if (uurb.signr != 0 && (uurb.signr < SIGRTMIN || uurb.signr > SIGRTMAX))     
>            return -EINVAL;
>         ...
> 
> From include/asm/signal.h, SIGRTMIN == 32, SIGRTMAX == 31.
> 
> There are two things I don't understand about this:
> 
>   1) It looks like a value of -1 will return an error.
>      Is the comment in usbdevice_fs.h wrong?

Most likely yes.

>   2) It appears that only 0 is allowed.  When is this used?

For async IO. You can arrange to be sent a signal if the urb you
submitted finishes. The legal values appear to be 31 and 32, 0
meaning no signal.
Perhaps you might send in a patch to correct the comment. Talking about
an unsigned variable being -1 should not happen.

        Regards
                Oliver



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to