Note
we are using this "intermediate" API in order to allow Linux-like O/S-es to implement the same API, but maybe using a different library name
| Modifier and Type | Class and Description |
|---|---|
| public static class | LibCAPI.size_t
This is an unsigned integer type used to represent the sizes of objects. |
| public static class | LibCAPI.ssize_t
This is a signed integer type used for a count of bytes or an error indication. |
| Modifier and Type | Field and Description |
|---|---|
| public static final int |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: returns zero on success. On error, -1 is returned, anderrno
is set appropriately.
a file descriptor fd)Closes a file descriptor, so that it no longer refers to any file and may be reused. |
| public int | |
| public int | |
| public String | |
| public int | |
| public int | |
| public int | |
| public int | Returns: If the load average was unobtainable, -1 is returned; otherwise, the number of samples actually retrieved is returned.An array of doubles which will be filled with the results loadavg, int Number of samples to return nelem)The getloadavg() function returns the number of processes in the system run queue averaged over various periods of time. |
| public int | |
| public int | Returns: On success, zero is returned. On error, -1 is returned, anderrno is set appropriately.The start of the memory area to sync to the filesystem. addr, LibCAPI.The length of the memory area to sync to the filesystem. length,The flags argument should specify exactly one of flags)MS_ASYNC
and MS_SYNC, and may additionally include the
MS_INVALIDATE bit.Flushes changes made to the in-core copy of a file that was mapped into
memory using |
| public int | Returns: On success, returns 0. On failure, it returns -1, anderrno
is set to indicate the cause of the error (probably to
EINVAL).The base address from which to delete mappings. The address addr
must be a multiple of the page size (but length need not be). addr, LibCAPI.The length from the base address to delete mappings. All pages
containing a part of the indicated range are unmapped, and
subsequent references to these pages will generate
lengthSIGSEGV.Deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. |
| public int | |
| public int | |
| public int | Returns: Upon successful completion, zero shall be returned. Otherwise, -1 shall be returned,errno set to indicate the error, and the
environment shall be unchangedEnvironment variable name name, String Required value value, int If the environment variable already exists and the
value of overwrite)overwrite is non-zero, the function shall return
success and the environment shall be updated. If the environment
variable already exists and the value of overwrite is zero, the
function shall return success and the environment shall remain unchanged.Update or add a variable in the environment of the calling process. |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | Returns: Upon successful completion, zero shall be returned. Otherwise, -1 shall be returned,errno set to indicate the error, and the
environment shall be unchangedEnvironment variable name - If the named variable does not
exist in the current environment, the environment shall be unchanged
and the function is considered to have completed successfully. name)
|
| HOST_NAME_MAX | back to summary |
|---|---|
| public static final int HOST_NAME_MAX | |
| close | back to summary |
|---|---|
| public int close(int fd) Closes a file descriptor, so that it no longer refers to any file and may be reused. Any record locks held on the file it was associated with, and owned by the process, are removed (regardless of the file descriptor that was used to obtain the lock).
If
| |
| getdomainname | back to summary |
|---|---|
| public int getdomainname(byte[] name, int len) | |
| getegid | back to summary |
|---|---|
| public int getegid() | |
| getenv | back to summary |
|---|---|
| public String getenv(String name) | |
| geteuid | back to summary |
|---|---|
| public int geteuid() | |
| getgid | back to summary |
|---|---|
| public int getgid() | |
| gethostname | back to summary |
|---|---|
| public int gethostname(byte[] name, int len) | |
| getloadavg | back to summary |
|---|---|
| public int getloadavg(double[] loadavg, int nelem) The getloadavg() function returns the number of processes in the system run queue averaged over various periods of time. Up to nelem samples are retrieved and assigned to successive elements of loadavg[]. The system imposes a maximum of 3 samples, representing averages over the last 1, 5, and 15 minutes, respectively.
| |
| getuid | back to summary |
|---|---|
| public int getuid() | |
| msync | back to summary |
|---|---|
| public int msync(Pointer addr, LibCAPI. Flushes changes made to the in-core copy of a file that was mapped into
memory using
| |
| munmap | back to summary |
|---|---|
| public int munmap(Pointer addr, LibCAPI. Deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. The region is also automatically unmapped when the process is terminated. On the other hand, closing the file descriptor does not unmap the region. It is not an error if the indicated range does not contain any mapped pages.
| |
| setdomainname | back to summary |
|---|---|
| public int setdomainname(String name, int len) | |
| setegid | back to summary |
|---|---|
| public int setegid(int gid) | |
| setenv | back to summary |
|---|---|
| public int setenv(String name, String value, int overwrite) Update or add a variable in the environment of the calling process.
| |
| seteuid | back to summary |
|---|---|
| public int seteuid(int uid) | |
| setgid | back to summary |
|---|---|
| public int setgid(int gid) | |
| sethostname | back to summary |
|---|---|
| public int sethostname(String name, int len) | |
| setuid | back to summary |
|---|---|
| public int setuid(int uid) | |
| unsetenv | back to summary |
|---|---|
public int unsetenv(String name)
| |
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| public static final LibCAPI. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ZERO | back to summary |
|---|---|
| public static final LibCAPI. | |
| size_t | back to summary |
|---|---|
| public size_t() | |
| size_t | back to summary |
|---|---|
| public size_t(long value) | |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public LibCAPI. | |
| public long | |
| public void | |
| public void |
| ByReference | back to summary |
|---|---|
| public ByReference() | |
| ByReference | back to summary |
|---|---|
| public ByReference(long value) | |
| ByReference | back to summary |
|---|---|
| public ByReference(LibCAPI. | |
| getValue | back to summary |
|---|---|
| public LibCAPI. | |
| longValue | back to summary |
|---|---|
| public long longValue() | |
| setValue | back to summary |
|---|---|
| public void setValue(long value) | |
| setValue | back to summary |
|---|---|
| public void setValue(LibCAPI. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| public static final LibCAPI. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ZERO | back to summary |
|---|---|
| public static final LibCAPI. | |
| ssize_t | back to summary |
|---|---|
| public ssize_t() | |
| ssize_t | back to summary |
|---|---|
| public ssize_t(long value) | |