platform_system_core/lmkd/Android.bp
Mark Salyzyn 721d7c7fa3 lmkd: only mlockall() if enabled
Move process initialization, mlockall() and sched_setscheduler() to
only occur if initialization succeeds and is enabled.  This
conserves mlock'd memory and a FIFO processing slot if (deprecated)
kernel lowmemorykiller is active.

Cleanup: Android coding standard compliance.

Test: lmkd_unit_test
Bug: 33808187
Bug: 72838192
Change-Id: I51af0235c8eca4ef958ef2d83a8071ff58b49d78
2018-04-03 14:41:26 +00:00

35 lines
587 B
Text

cc_binary {
name: "lmkd",
srcs: ["lmkd.c"],
shared_libs: [
"libcutils",
"liblog",
],
local_include_dirs: ["include"],
cflags: ["-Werror"],
init_rc: ["lmkd.rc"],
product_variables: {
debuggable: {
cflags: [
"-DLMKD_TRACE_KILLS"
],
},
},
}
cc_library_static {
name: "liblmkd_utils",
srcs: ["liblmkd_utils.c"],
shared_libs: [
"libcutils",
],
export_include_dirs: ["include"],
cppflags: [
"-g",
"-Wall",
"-Werror",
]
}