1.1 --- a/tests/dstest_exec.cc Sun Mar 19 00:49:19 2023 +0100
1.2 +++ b/tests/dstest_exec.cc Sun Mar 19 01:18:23 2023 +0100
1.3 @@ -1,5 +1,5 @@
1.4 /*
1.5 - * Support for executing code in new tasks and threads.
1.6 + * A test of executing code in new tasks and threads.
1.7 *
1.8 * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 @@ -19,9 +19,7 @@
1.11 * Boston, MA 02110-1301, USA
1.12 */
1.13
1.14 -#include <l4/re/env.h>
1.15 #include <l4/sys/err.h>
1.16 -#include <l4/util/util.h>
1.17
1.18 #include <fsclient/process.h>
1.19 #include <systypes/format.h>
1.20 @@ -42,11 +40,15 @@
1.21
1.22 /* Create a new process structure. */
1.23
1.24 - process_t *process = process_new();
1.25 + process_t process;
1.26 +
1.27 + process_init(&process);
1.28 +
1.29 + printf("Start process...\n");
1.30
1.31 /* Start a process for the given program. */
1.32
1.33 - err = process_start(process, argc - 1, argv + 1);
1.34 + err = process_start(&process, argc - 1, argv + 1);
1.35
1.36 if (err)
1.37 {
1.38 @@ -62,7 +64,7 @@
1.39
1.40 /* Subscribe to the process for notifications. */
1.41
1.42 - err = process_notify_subscribe(process, NOTIFY_TASK_SIGNAL, notifier);
1.43 + err = process_notify_subscribe(&process, NOTIFY_TASK_SIGNAL, notifier);
1.44
1.45 if (err)
1.46 {
1.47 @@ -72,7 +74,7 @@
1.48
1.49 /* Wait for a signal from the process. */
1.50
1.51 - err = process_notify_wait_process(process, notifier);
1.52 + err = process_notify_wait_process(&process, notifier);
1.53
1.54 if (err)
1.55 {
1.56 @@ -80,11 +82,12 @@
1.57 return 1;
1.58 }
1.59
1.60 - notify_flags_t flags = process_notifications(process);
1.61 - notify_values_t values = process_notification_values(process);
1.62 + notify_flags_t flags = process_notifications(&process);
1.63 + notify_values_t values = process_notification_values(&process);
1.64
1.65 - printf("Notified with flags: %" pFMTnotify_flags "x\n", flags);
1.66 - printf("Notified with values: %ld, %ld\n", values.sig, values.val);
1.67 + process_close(&process);
1.68 +
1.69 + printf("End process (flags %" pFMTnotify_flags "x values: %ld, %ld)\n", flags, values.sig, values.val);
1.70
1.71 printf("End of test.\n");
1.72 return 0;