Browse Source

Fixes review comments

Signed-off-by: peda1337 <gsellmann@acin.tuwien.ac.at>
peda1337 7 years ago
parent
commit
822ed1d5d5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      source/src/ports/POSIX/main.c

+ 3 - 2
source/src/ports/POSIX/main.c

@@ -125,8 +125,7 @@ int main(int argc,
     struct sched_param param;
     struct sched_param param;
     pthread_attr_t attr;
     pthread_attr_t attr;
     pthread_t thread;
     pthread_t thread;
-    CipUint ret;
-    ret = pthread_attr_init(&attr);
+    CipUint ret = pthread_attr_init(&attr);
     if (ret) {
     if (ret) {
       OPENER_TRACE_ERR("init pthread attributes failed\n");
       OPENER_TRACE_ERR("init pthread attributes failed\n");
       exit(-2);
       exit(-2);
@@ -170,6 +169,8 @@ int main(int argc,
     if (ret) {
     if (ret) {
       OPENER_TRACE_ERR("join pthread failed: %m\n");
       OPENER_TRACE_ERR("join pthread failed: %m\n");
     }
     }
+    /* Unlock memory */
+    munlockall();
 #else
 #else
     executeEventLoop();
     executeEventLoop();
 #endif
 #endif