From cfbab68a9db9b1405712903eb611340d2d45925c Mon Sep 17 00:00:00 2001 From: "jack.wxz" Date: Thu, 11 Jun 2020 08:09:15 +0000 Subject: [PATCH] Use pal api interface without prefix of libos type. Signed-off-by: jack.wxz --- src/pal/pal.lds | 6 ++++++ src/pal/src/pal_api.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/pal/pal.lds b/src/pal/pal.lds index 7ee33d5e..4417d2d6 100644 --- a/src/pal/pal.lds +++ b/src/pal/pal.lds @@ -6,6 +6,12 @@ occlum_pal_exec; occlum_pal_kill; occlum_pal_destroy; + pal_get_version; + pal_init; + pal_create_process; + pal_exec; + pal_kill; + pal_destroy; local: *; }; diff --git a/src/pal/src/pal_api.c b/src/pal/src/pal_api.c index 4fc05a39..c4d358a6 100644 --- a/src/pal/src/pal_api.c +++ b/src/pal/src/pal_api.c @@ -157,3 +157,18 @@ int occlum_pal_destroy(void) { } return 0; } + +int pal_get_version(void) __attribute__((weak, alias ("occlum_pal_get_version"))); + +int pal_init(const struct occlum_pal_attr *attr)\ +__attribute__ ((weak, alias ("occlum_pal_init"))); + +int pal_create_process(struct occlum_pal_create_process_args *args)\ +__attribute__ ((weak, alias ("occlum_pal_create_process"))); + +int pal_exec(struct occlum_pal_exec_args *args)\ +__attribute__ ((weak, alias ("occlum_pal_exec"))); + +int pal_kill(int pid, int sig) __attribute__ ((weak, alias ("occlum_pal_kill"))); + +int pal_destroy(void) __attribute__ ((weak, alias ("occlum_pal_destroy")));