diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-06-05 02:09:04 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-06-05 02:09:04 +0400 |
commit | 415ee7d6e47dcb3e0906a7bebc6d52ab8ed899da (patch) | |
tree | f7773ad82023c8616b339d84faa4bb7643af0311 /sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sys/swap.h | |
parent | 3cc0cd4c5b3bed6f7d9aff26322d505785e11aa9 (diff) | |
download | glibc-415ee7d6e47dcb3e0906a7bebc6d52ab8ed899da.tar.gz |
Merged changes from kopensolaris-gnu project
http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu/glibc.git
Commits from 9157319 to bad8ac8.
This is only partial patch, some changes to not apply
and will be resovled and committed next.
Diffstat (limited to 'sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sys/swap.h')
-rw-r--r-- | sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sys/swap.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sys/swap.h b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sys/swap.h new file mode 100644 index 0000000000..2e8476695f --- /dev/null +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sys/swap.h @@ -0,0 +1,78 @@ +/* Calls to enable and disable swapping on specified locations. + OpenSolaris version. + Copyright (C) 1996, 1997, 2000, 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef __SYS_SWAP_H +#define __SYS_SWAP_H + +/* Docs: http://docs.sun.com/app/docs/doc/816-5167/swapctl-2?a=view */ + +#include <features.h> +#include <bits/types.h> + +/* swapctl cmd values. */ +#define SC_ADD 1 +#define SC_LIST 2 +#define SC_REMOVE 3 +#define SC_GETNSWP 4 +#define SC_AINFO 5 + +/* swapctl arg for SC_ADD and SC_REMOVE. */ +typedef struct swapres + { + char *sr_name; + __off_t sr_start; + __off_t sr_length; + } swapres_t; + +typedef struct swapent + { + char *ste_path; + __off_t ste_start; + __off_t ste_length; + long ste_pages; + long ste_free; + int ste_flags; + } swapent_t; + +/* ste_flags values. */ +#define ST_INDEL 1 +#define ST_DOINGDEL 2 + +/* swapctl arg for SC_LIST. */ +typedef struct swaptable + { + int swt_n; + swapent_t swt_ent[1]; + } swaptbl_t; + +__BEGIN_DECLS + +/* Make the block special device PATH available to the system for swapping. + This call is restricted to the super-user. */ +extern int swapon (__const char *__path) __THROW; + +/* Stop using block special device PATH for swapping. */ +extern int swapoff (__const char *__path) __THROW; + +extern int swapctl (int cmd, void *arg); + +__END_DECLS + +#endif /* sys/swap.h */ |