Initialize Tizen 2.3
[kernel/api/system-resource.git] / src / memory / stub-memory.c
1 /*
2  * resourced
3  *
4  * Copyright (c) 2000 - 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 stub-memory.c
22  * @desc Implement memory API stubs
23  *
24  * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
25  *
26  */
27
28 #include "lowmem-process.h"
29 #include "macro.h"
30 #include "proc-main.h"
31 #include "resourced.h"
32
33 #include <string.h>
34
35 int get_proc_oom_score_adj(UNUSED int pid, UNUSED int *oom_score_adj)
36 {
37         return RESOURCED_ERROR_NONE;
38 }
39
40 int set_proc_oom_score_adj(UNUSED int pid, UNUSED int oom_score_adj)
41 {
42         return RESOURCED_ERROR_NONE;
43 }
44
45 int lowmem_set_active(UNUSED int pid, UNUSED int oom_score_adj)
46 {
47         return RESOURCED_ERROR_NONE;
48 }
49
50 int lowmem_set_inactive(UNUSED int pid, UNUSED int oom_score_adj)
51 {
52         return RESOURCED_ERROR_NONE;
53 }
54
55 int lowmem_set_foregrd(UNUSED int pid, UNUSED int oom_score_adj)
56 {
57         return RESOURCED_ERROR_NONE;
58 }
59
60 int lowmem_set_backgrd(UNUSED int pid, UNUSED int oom_score_adj)
61 {
62         return RESOURCED_ERROR_NONE;
63 }
64
65 int lowmem_sweep_memory(UNUSED int callpid)
66 {
67         return RESOURCED_ERROR_NONE;
68 }
69
70 int lowmem_get_proc_cmdline(UNUSED pid_t pid, char *cmdline)
71 {
72         strncpy(cmdline, "", PROC_NAME_MAX-1);
73         return RESOURCED_ERROR_NONE;
74 }