Module guidelines
Module developers should follow these guidelines:
-
Message types that are not understood by the modules
should be passed to the next module.
-
The module that acts on an
M_IOCTL(D7str)
message type should
send an
M_IOCACK(D7str)
or
M_IOCNAK(D7str)
message in response to the ioctl.
If the module does not understand the ioctl,
it should pass the M_IOCTL message to the next module.
-
Modules should be designed in such a
way that they do not pertain to any particular
driver but can be used by all drivers.
-
In general, modules should not require
the data in an
M_DATA(D7str)
message to follow a
particular format, such as a specific alignment.
This makes it easier to arbitrarily push modules
on top of each other in a sensible fashion.
Not following this rule may limit module reusability.
-
Filter modules pushed between a service user
and a service provider
may not alter the contents of the
M_PROTO(D7str)
or
M_PCPROTO(D7str)
block in messages.
The contents of the data blocks may be manipulated,
but the message boundaries must be preserved.
-
A multithreaded module is responsible for
protecting module-specific data against
multiprocessor race conditions.
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005