libsysactivity 0.6.2
|
00001 /* 00002 * libsysactivity 00003 * http://sourceforge.net/projects/libsysactivity/ 00004 * Copyright (c) 2009, 2010 Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00025 #ifndef SA_SWAP_H_ 00026 #define SA_SWAP_H_ 00027 00031 SA_EXPORT struct sa_swap { 00032 #ifdef SA_SWAP_NAME 00033 char name[SA_SWAP_NAME]; 00034 #endif 00035 #ifdef SA_SWAP_TOTAL 00036 uint64_t total; 00037 #endif 00038 #ifdef SA_SWAP_FREE 00039 uint64_t free; 00040 #endif 00041 #ifdef SA_SWAP_TYPE 00042 int8_t type; 00043 #endif 00044 }; 00045 00046 #ifdef SA_OPEN_SWAP 00047 00052 int sa_open_swap(void) SA_EXPORT; 00053 #endif 00054 00055 #ifdef SA_CLOSE_SWAP 00056 00061 int sa_close_swap(void) SA_EXPORT; 00062 #endif 00063 00070 int sa_count_swaps(uint16_t* number) SA_EXPORT SA_NONNULL; 00071 00076 int sa_reset_swaps() SA_EXPORT; 00077 00085 int sa_get_swap(uint16_t index, struct sa_swap* dst) SA_EXPORT SA_NONNULL; 00086 00095 int sa_get_swaps(struct sa_swap* dst, uint16_t dst_size, uint16_t* written) SA_EXPORT SA_NONNULL; 00096 00098 #endif /* SA_SWAP_H_ */