summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJerin Jacob <jerinj@marvell.com>2019-03-18 04:15:56 +0000
committerThomas Monjalon <thomas@monjalon.net>2019-03-27 23:10:57 +0100
commit55878866eb2b6d4e00ff5624259a92f13e10b481 (patch)
tree580cc05527c2baf149a4f47212e54c4254938dce /app
parent0c7ce182a7600871a45e16ff8b3a1350be5d93ae (diff)
downloaddpdk-next-eventdev-55878866eb2b6d4e00ff5624259a92f13e10b481.zip
dpdk-next-eventdev-55878866eb2b6d4e00ff5624259a92f13e10b481.tar.gz
dpdk-next-eventdev-55878866eb2b6d4e00ff5624259a92f13e10b481.tar.xz
use appropriate EAL macro for constructors
Use eal's RTE_INIT abstraction for defining constructors. Signed-off-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-bbdev/main.h3
-rw-r--r--app/test/resource.h2
-rw-r--r--app/test/test.h3
3 files changed, 3 insertions, 5 deletions
diff --git a/app/test-bbdev/main.h b/app/test-bbdev/main.h
index 20a55ef..2bbe1b8 100644
--- a/app/test-bbdev/main.h
+++ b/app/test-bbdev/main.h
@@ -103,8 +103,7 @@ void add_test_command(struct test_command *t);
.command = RTE_STR(name), \
.callback = test_func_##name, \
}; \
- static void __attribute__((constructor, used)) \
- test_register_##name(void) \
+ RTE_INIT(test_register_##name) \
{ \
add_test_command(&test_struct_##name); \
}
diff --git a/app/test/resource.h b/app/test/resource.h
index 223fa22..c75ebd4 100644
--- a/app/test/resource.h
+++ b/app/test/resource.h
@@ -98,7 +98,7 @@ static struct resource linkres_ ##n = { \
.begin = b, \
.end = e, \
}; \
-static void __attribute__((constructor, used)) resinitfn_ ##n(void) \
+RTE_INIT(resinitfn_ ##n) \
{ \
resource_register(&linkres_ ##n); \
}
diff --git a/app/test/test.h b/app/test/test.h
index 7c24432..9b3846b 100644
--- a/app/test/test.h
+++ b/app/test/test.h
@@ -177,8 +177,7 @@ void add_test_command(struct test_command *t);
.command = RTE_STR(cmd), \
.callback = func, \
}; \
- static void __attribute__((constructor, used)) \
- test_register_##cmd(void) \
+ RTE_INIT(test_register_##cmd) \
{ \
add_test_command(&test_struct_##cmd); \
}