tizen 2.3.1 release
[kernel/api/system-resource.git] / src / common / swap-common.h
1 /*
2  * resourced
3  *
4  * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 /**
21  * @file swap-common.h
22  * @desc swap common process
23  **/
24
25 #ifndef __SWAP_COMMON_H__
26 #define __SWAP_COMMON_H__
27
28 enum swap_status_type {
29         SWAP_GET_TYPE,
30         SWAP_GET_CANDIDATE_PID,
31         SWAP_GET_STATUS,
32         SWAP_CHECK_PID,
33         SWAP_CHECK_CGROUP,
34 };
35
36 enum {
37         SWAP_OFF,
38         SWAP_ON,
39         SWAP_ARG_END,
40 };
41
42 enum {
43         SWAP_FALSE,
44         SWAP_TRUE,
45 };
46
47 #ifdef SWAP_SUPPORT
48 extern int swap_status(enum swap_status_type type, unsigned long *args);
49 #else
50 static inline int swap_status(enum swap_status_type type, unsigned long *args)
51 {
52         return RESOURCED_ERROR_NONE;
53 }
54 #endif /* SWAP_SUPPORT */
55
56 #endif /* __SWAP_COMMON_H__ */