Re: f_ops flag to speed up compatible ioctls in linux kernel

From: filia
Date: Wed Sep 01 2004 - 05:18:48 EST


Arjan van de Ven writes:

On Wed, Sep 01, 2004 at 03:50:11AM -0600, filia@xxxxxxxxxxxx wrote:
Hi!

Stop being arrogant.
Can you please elaborate on how to make Linux kernel support e.g. motion controllers? They do not fit *any* known to me driver interface. They have several axes, they have about twenty parameters (float or integer), and

parameters nicely fit in sysfs.


What about errors?
"set di 200000" might fail for lots of reasons.

they have several commands, a-la start, graceful stop, abrupt stop. Plus obviously diagnostics - about ten another commands with absolutely different parameters. And about ten motion monitoring commands. And this is one example I were need to program.

a write() interface doesn't work???
Hard to believe, you even call them commands.
fd = open("/dev/funkydevice");
write(fd, "start");

doesn't sound insane to me


it doesn't, since you didn't tryed to make error handling. every thing can fail - this is control of mechanics - and it fails often and for a lot of reasons. Put here error handling (write(struct whatever) has to return another struct whatever2 filled with error description) and thread-safeness. Pluss some controllers do support multi-dimensional movements "start x,y,z,etc" - and you might have _several_ error structs. Atomicity is important for multi-dimensional moves too - move on given axes starts with single command.

hu?

I do not see much point in renaming ioctl() to write() all over the place - at least when people see ioctl() they understand that it is not standard functionality. write() will for sure confuse a lot of people.

--- with respect. best regards.
*** Philips @ Saarbruecken. -
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/