STREAMS/UX for the HP 9000 Reference Manual

74
STREAMS/UX Multiprocessor Support
Running Modules and Drivers in Uniprocessor Emulation Mode
Mixing MP Scalable and UP Emulation Modules and Drivers
Because UP emulation and MP scalability are configured separately for each
module or driver, it is possible for a stream to contain both UP emulation
and MP scalable modules and drivers. If any module or driver in a stream
needs to run in UP emulation mode, STREAMS/UX runs the entire stream
under UP emulation.
int
lo_install()
{
int retval;
if ((retval = install_driver(&lo_drv_info, &lo_drv_ops)) != 0)
return(retval);
if ((retval = str_install(&lo_str_info)) != 0) {
uninstall_driver(&lo_drv_info);
return(retval);
}
/* success */
return 0;
}
LMODB MODULE
static streams_info_t lmodb_str_info = { /* streams information */
“lmodb”, /* name */
-1, /* major number */
{ &lmodbrinit, &lmodbwinit }, /* streamtab */
STR_IS_MODULE, /* *****NOTE***** MGR_IS_MP flag not
specified */
0, /* synchronization level */
“”, /* elsewhere sync name */
}
int
lmodb_install()
{
int retval;
return(str_install(&lmodb_str_info));
}