COHERENT manpages
This page displays the COHERENT manpage for sysi86() [Identify parts within Intel-based machines].
List of available manpages
Index
sysi86() -- System Call (libc)
Identify parts within Intel-based machines
#include <sys/sysi86.h>
int sysi86(hardware, type)
int hardware, *type;
The system call sysi86() identifies parts within Intel-based computers.
hardware names the machine part that you wish to identify; you should
always use one of the constants defined in header file
<sys/sysi86.h>. type point to the int into which sysi86() writes an
identifying code.
sysi86() returns -1 if it was unable to read your machine. It returns a
value other than -1 if it succeeds in reading your machine.
Example
The following program identifies the type of floating-point processor in
your machine.
#include <sys/sysi86.h>
#ifndef FP_NO
/*
* The following header may be needed to get the FP_... constants on some
* other implementations of the iBCS2 specification; while the sysi86()
* system call and the SI86FPHW constant are part of the iBCS2 specification,
* the FP_... constants and the <sys/fp.h> header are not.
*/
#include <sys/fp.h>
#endif
const char *
floating_point_provider ()
{
int fp_type;
if (sysi86 (SI86FPHW, & fp_type) == -1)
return "unable to retrieve FP type";
switch (fp_type) {
case FP_NO:
return "no FP hardware or emulation available";
case FP_SW:
return "software emulation of FP hardware";
case FP_287:
return "80287 hardware FP";
case FP_387:
return "80387 or 80486DX hardware FP";
default:
return "unknown floating-point provider";
}
}
main()
{
printf("%s\n", floating_point_provider());
}
See Also
libc,
sysi86.h
Notes
At present under COHERENT, this system call can interrogate a machine only
for the type of its floating-point processor.






