DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

archtobus(D3oddi)


archtobus -- extract bus type from architecture

Synopsis

#include <sys/arch.h>
#include <sys/ci/cidriver.h>

int archtobus(unsigned long arch);

Description

The archtobus function extracts the bus type for the current machine architecture from the value arch set up by the kernel.

Arguments


arch
Kernel value that defines the current machine architecture.

Return values

archtobus returns one of the following, defined in <sys/ci/cidriver.h>:

MP_ATBUS
bus is type AT or EISA (Industry Standard Architecture or Extended Industry Standard Architecture)

MP_MCABUS
bus is type MC (Micro Channel Architecture)

-1
bus is of unknown type

Usage

Context and synchronization

All contexts.

Hardware applicability

All

Version applicability

oddi: 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

This function is not supported for DDI drivers. DDI drivers can determine the bus type for the current machine by calling the cm_getval(D3) function to access the CM_BRDBUSTYPE and CM_BUSTYPES parameters documented on the cm_params(D5) manual page.

References

all_io(D3oddi), pci_buspresent(D3oddi)

cm_params(D5)

``ODDI driver interface version for SCO OpenServer 5'' in HDK Technical Reference

Examples

archtobus can be used with all_io(D3oddi) to determine if all processors can perform device I/O, as follows:
   if (all_io(archtobus(arch)))
   	/* device I/O allowed on all processors */
   else
   	/* device I/O not allowed on all processors */
   


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005