libsysactivity
0.6.5
Main Page
Related Pages
Modules
Data Structures
All
Data Structures
Functions
Variables
Enumerations
Enumerator
Groups
Pages
src
common
swap.h
1
/*
2
* libsysactivity
3
* http://sourceforge.net/projects/libsysactivity/
4
* Copyright (c) 2009, 2010 Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
25
#ifndef SA_SWAP_H_
26
#define SA_SWAP_H_
27
31
struct
sa_swap
{
32
#ifdef SA_SWAP_NAME
33
char
name
[SA_SWAP_NAME];
34
#endif
35
#ifdef SA_SWAP_TOTAL
36
uint64_t
total
;
37
#endif
38
#ifdef SA_SWAP_FREE
39
uint64_t
free
;
40
#endif
41
#ifdef SA_SWAP_TYPE
42
int8_t
type
;
43
#endif
44
};
45
46
#ifdef SA_OPEN_SWAP
47
52
int
sa_open_swap
(
void
) SA_EXPORT;
53
#endif
54
55
#ifdef SA_CLOSE_SWAP
56
61
int
sa_close_swap
(
void
) SA_EXPORT;
62
#endif
63
70
int
sa_count_swaps
(uint16_t* number) SA_EXPORT SA_NONNULL;
71
76
int
sa_reset_swaps
() SA_EXPORT;
77
85
int
sa_get_swap
(uint16_t index, struct
sa_swap
* dst) SA_EXPORT SA_NONNULL;
86
95
int
sa_get_swaps
(struct
sa_swap
* dst, uint16_t dst_size, uint16_t* written) SA_EXPORT SA_NONNULL;
96
98
#endif
/* SA_SWAP_H_ */
Generated on Tue Sep 24 2013 09:28:38 for libsysactivity by
1.8.4