Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ swapctl(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought



SWAPCTL(2,L)                AIX Technical Reference                SWAPCTL(2,L)



-------------------------------------------------------------------------------
swapctl



PURPOSE

Controls swap devices

SYNTAX

#include <sys/swap.h>

int swapctl(sc_type, sc_device)
int sc_type;
char *sc_device;

int swapctl(sc_type, sc_nrecs, sc_tab)
int sc_type, sc_nrecs;
swpt_t *sc_tab;

DESCRIPTION

The first form of swapctl adds a swap device to or deletes a swap device from
the swapping subsystem. When sc_type is SC_ADD, the device specified by
sc_device is added to the swapping subsystem and is used along with any other
swap device that is a part of the swapping subsystem to page or swap memory
pages to and from memory. When sc_type is SC_DEL, the device specified by
sc_device is deleted from the swapping subsystem. A device that is deleted is
not available for swapping.

The second form of swapctl provides information about swap devices. When
sc_type is SC_LIST, information about sc_nrecs swap devices is placed in memory
at the location specified by sc_tab and the number of available swap devices is
returned. When sc_nrecs is 0, information about the swap devices is not placed
in memory at the location specified by sc_tab; however, the number of available
swap devices is returned.

Note:  This system call is for use only by root processes.

RETURN VALUE

If swapctl fails, the return value is -1 and errno will be set to indicate the
error.

ERROR CONDITIONS

The swapctl system call fails if one or more of the following are true:

EFAULT       Bad address.





Processed November 7, 1990       SWAPCTL(2,L)                                 1





SWAPCTL(2,L)                AIX Technical Reference                SWAPCTL(2,L)



EINVAL       Invalid argument.

ELOCALONLY   Operation restricted to local site.

ENODEV       No such device.

ENOTBLK      Block device required.

ENXIO        No such device address.

EPERM        Operation not permitted.












































Processed November 7, 1990       SWAPCTL(2,L)                                 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026