195 lines
4.5 KiB
Groff
195 lines
4.5 KiB
Groff
'\"macro stdmacro
|
|
.TH SYSMIPS 2
|
|
.SH NAME
|
|
sysmips \- MIPS Computer Systems Inc. system call
|
|
.SH SYNOPSIS
|
|
.B #include <sys/sysmips.h>
|
|
.sp
|
|
.B "int sysmips (int cmd, int arg1, int arg2, int arg3);"
|
|
.SH DESCRIPTION
|
|
.PP
|
|
.I sysmips
|
|
is the interface to various machine specific functions.
|
|
The
|
|
.I cmd
|
|
argument determines the function performed.
|
|
The number of arguments expected is dependent on the function.
|
|
.PP
|
|
.TP 5
|
|
.SM
|
|
.B SETNAME
|
|
This function renames the system, which is sometimes referred to as the
|
|
node name or host name.
|
|
A single argument of type char * is expected.
|
|
This points to a string that has a length less or equal to
|
|
MAXHOSTNAMELEN characters
|
|
(defined in param.h).
|
|
.PP
|
|
Note that this function is obsolescent. Instead, \f4uname\f1(2) should be used.
|
|
.TP 5
|
|
.SM
|
|
.B STIME
|
|
This function sets the system time and date.
|
|
The single argument is of type long and contains the time as
|
|
measured in seconds from 00:00:00 GMT January 1, 1970.
|
|
It does not affect the hardware battery backed up time-of-day
|
|
clock.
|
|
Note that this command is only available to the super-user.
|
|
.TP 5
|
|
.SM
|
|
.B FLUSH_CACHE
|
|
This function flushes both the instruction and data caches.
|
|
On multiprocessor systems, all caches on all processors are flushed.
|
|
For finer control, use
|
|
.IR cacheflush (2).
|
|
No arguments are expected.
|
|
.TP 5
|
|
.SM
|
|
.B SMIPSSWPI
|
|
Add to, delete from, or determine the currently active swap areas.
|
|
The address of an appropriately primed swap buffer is passed as the only
|
|
argument.
|
|
(This buffer is displayed below and defined in the
|
|
.B sys/swap.h
|
|
header file;
|
|
refer to this file for details of loading the buffer.)
|
|
.sp
|
|
The format of the swap buffer is:
|
|
.sp
|
|
.nf
|
|
struct swapinf {
|
|
char *si_cmd; /* command: list, add, delete */
|
|
char *si_buf; /* swap file path pointer */
|
|
int si_swplo; /* start block */
|
|
int si_nblks; /* swap size */
|
|
}
|
|
.fi
|
|
.sp
|
|
Note that the add and delete options of the command may only be exercised
|
|
by the super-user.
|
|
.TP 5
|
|
.SM
|
|
.B MIPS_FIXADE
|
|
This function enables or disables the transparent recovery from
|
|
unaligned address exceptions for the current process.
|
|
If
|
|
.I arg1
|
|
is 1, recovery is enabled. If
|
|
.I arg1
|
|
is 0, recovery is disabled.
|
|
For example, a halfword data access on an odd byte boundary would
|
|
ordinarily generate a
|
|
.SM
|
|
.B SIGBUS
|
|
signal to the user.
|
|
After calling this function with
|
|
.I arg1
|
|
set to 1, the operating system
|
|
will attempt to allow the access to complete by retrying the access
|
|
using byte-wise instructions.
|
|
.TP 5
|
|
.SM
|
|
.B MIPS_FPSIGINTR
|
|
This function permits the caller to decide what happens when a floating
|
|
point operation requires operating system intervention.
|
|
If
|
|
.I arg1
|
|
is 0, then these floating point operations are silently executed by the
|
|
operating system.
|
|
If
|
|
.I arg1
|
|
is a 1, then
|
|
a
|
|
.SM
|
|
.B SIGFPE
|
|
signal is generated before the operation is handled.
|
|
The process's
|
|
.SM
|
|
.B SIGFPE
|
|
signal handler may then determine exactly
|
|
what caused the floating point hardware to require software intervention.
|
|
The operating system, before sending the signal, will change the value
|
|
from a 1 to a 2 which means the next time an operation requires
|
|
operating system assistance, the
|
|
.SM
|
|
.B SIGFPE
|
|
will not be generated, rather
|
|
the value will be set back to a 1, and the operation will be performed.
|
|
All other values for
|
|
.I arg1
|
|
are ignored.
|
|
This action is cleared on
|
|
.IR exec (2)
|
|
and inherited on
|
|
.IR fork (2)
|
|
and
|
|
.IR sproc(2).
|
|
A more complete exception handling package may be found in
|
|
.IR handle_sigfpes (3C).
|
|
.PP
|
|
When
|
|
.I cmd
|
|
is invalid,
|
|
.I errno
|
|
is set to
|
|
.SM EINVAL
|
|
on return.
|
|
.sp
|
|
In addition, the
|
|
.I cmd
|
|
SETNAME may also return:
|
|
.TP 15
|
|
.SM [EFAULT]
|
|
The argument points to an invalid address.
|
|
.PP
|
|
The
|
|
.I cmd
|
|
SMIPSSWPI may also return:
|
|
.TP 15
|
|
.SM [EFAULT]
|
|
.I Swapbuf
|
|
points to an invalid address.
|
|
.TP 15
|
|
.SM [EFAULT]
|
|
.I Swapbuf.si_buf
|
|
points to an invalid address.
|
|
.TP 15
|
|
.SM [ENOTBLK]
|
|
Swap area specified is not a block special device.
|
|
.TP 15
|
|
.SM [EEXIST]
|
|
Swap area specified has already been added.
|
|
.TP 15
|
|
.SM [ENOSPC]
|
|
Too many swap areas in use (if adding).
|
|
.TP 15
|
|
.SM [ENOMEM]
|
|
Tried to delete last remaining swap area.
|
|
.TP 15
|
|
.SM [ENOMEM]
|
|
No place to put swapped pages when deleting a swap area.
|
|
.TP 15
|
|
.SM [EINVAL]
|
|
Bad arguments.
|
|
.SH "SEE ALSO"
|
|
\f4cachectl\fP(2),
|
|
\f4cacheflush\fP(2),
|
|
\f4sethostname\fP(2),
|
|
\f4signal(\fP2),
|
|
\f4stime\fP(2),
|
|
\f4uname\fP(2),
|
|
\f4handle_sigfpes\fP(3C),
|
|
\f4swap\fP(1M).
|
|
.SH DIAGNOSTICS
|
|
Upon successful completion, the value returned is zero.
|
|
Otherwise, a value of -1 is returned and
|
|
.I errno
|
|
is set to indicate the error.
|
|
.SH BUGS
|
|
The command code
|
|
.SM
|
|
.B MIPS_FPU
|
|
is defined in
|
|
.I sys/sysmips.h
|
|
but is not implemented.
|