L4Re/departure

Changeset

540:32d715531598
2023-03-22 Paul Boddie raw files shortlog changelog graph Obtain the task-level notifier at the start, closing it at the end of the test.
tests/dstest_exec.cc (file)
     1.1 --- a/tests/dstest_exec.cc	Wed Mar 22 18:05:48 2023 +0100
     1.2 +++ b/tests/dstest_exec.cc	Wed Mar 22 23:13:16 2023 +0100
     1.3 @@ -38,6 +38,10 @@
     1.4      return 1;
     1.5    }
     1.6  
     1.7 +  /* Obtain the common notifier. */
     1.8 +
     1.9 +  process_notifier_t *notifier = process_notify_task();
    1.10 +
    1.11    /* Create a new process structure. */
    1.12  
    1.13    process_t process;
    1.14 @@ -58,10 +62,6 @@
    1.15  
    1.16    printf("Finished program initiation.\n");
    1.17  
    1.18 -  /* Obtain the common notifier. */
    1.19 -
    1.20 -  process_notifier_t *notifier = process_notify_task();
    1.21 -
    1.22    /* Subscribe to the process for notifications. */
    1.23  
    1.24    err = process_notify_subscribe(&process, NOTIFY_TASK_SIGNAL, notifier);
    1.25 @@ -89,6 +89,8 @@
    1.26  
    1.27    printf("End process (flags %" pFMTnotify_flags "x values: %ld, %ld)\n", flags, values.sig, values.val);
    1.28  
    1.29 +  process_notify_close(notifier);
    1.30 +
    1.31    printf("End of test.\n");
    1.32    return 0;
    1.33  }