summaryrefslogtreecommitdiffstats
path: root/darwin/Platform.c
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2016-08-30 20:41:17 +0800
committerExplorer09 <explorer09@gmail.com>2016-08-30 20:41:17 +0800
commit1f3d85b6174f690a7e354bbadac19404d5e75e78 (patch)
tree1d3b0d1348fe16ab51eb873bd567dc6f876b6411 /darwin/Platform.c
parentcceab15b9dbdc2f0914c8d479cefa429d1c0daaf (diff)
Mark signal tables 'const'
Specifically, Platform_signals[] and Platform_numberOfSignals. Both are not supposed to be mutable. Marking them 'const' puts them into rodata sections in binary. And for Platform_numberOfSignals, this aids optimization (aids only Link Time Optimization for now). :) Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Diffstat (limited to 'darwin/Platform.c')
-rw-r--r--darwin/Platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/darwin/Platform.c b/darwin/Platform.c
index 9274d0d8..e6a435c0 100644
--- a/darwin/Platform.c
+++ b/darwin/Platform.c
@@ -33,7 +33,7 @@ in the source distribution for its full text.
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
-SignalItem Platform_signals[] = {
+const SignalItem Platform_signals[] = {
{ .name = " 0 Cancel", .number = 0 },
{ .name = " 1 SIGHUP", .number = 1 },
{ .name = " 2 SIGINT", .number = 2 },
@@ -69,7 +69,7 @@ SignalItem Platform_signals[] = {
{ .name = "31 SIGUSR2", .number = 31 },
};
-unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem);
+const unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem);
ProcessFieldData Process_fields[] = {
[0] = { .name = "", .title = NULL, .description = NULL, .flags = 0, },

© 2014-2024 Faster IT GmbH | imprint | privacy policy