All Data Structures Functions Variables Enumerations Enumerator Groups Pages
swap.h
/*
* libsysactivity
* http://sourceforge.net/projects/libsysactivity/
* Copyright (c) 2009, 2010 Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
*
* This 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.
*
* This 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 this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef SA_SWAP_H_
#define SA_SWAP_H_
struct sa_swap {
#ifdef SA_SWAP_NAME
char name[SA_SWAP_NAME];
#endif
#ifdef SA_SWAP_TOTAL
uint64_t total;
#endif
#ifdef SA_SWAP_FREE
uint64_t free;
#endif
#ifdef SA_SWAP_TYPE
int8_t type;
#endif
};
#ifdef SA_OPEN_SWAP
int sa_open_swap(void) SA_EXPORT;
#endif
#ifdef SA_CLOSE_SWAP
int sa_close_swap(void) SA_EXPORT;
#endif
int sa_count_swaps(uint16_t* number) SA_EXPORT SA_NONNULL;
int sa_reset_swaps() SA_EXPORT;
int sa_get_swap(uint16_t index, struct sa_swap* dst) SA_EXPORT SA_NONNULL;
int sa_get_swaps(struct sa_swap* dst, uint16_t dst_size, uint16_t* written) SA_EXPORT SA_NONNULL;
#endif /* SA_SWAP_H_ */