1.1 --- a/tests/dstest_exec_many.cc Sat Dec 09 22:12:34 2023 +0100
1.2 +++ b/tests/dstest_exec_many.cc Sat Dec 09 22:12:58 2023 +0100
1.3 @@ -41,23 +41,15 @@
1.4
1.5 int num_processes = atoi(argv[1]);
1.6
1.7 - /* Obtain the common notifier. */
1.8 -
1.9 - notifier_t *notifier = notify_get_task();
1.10 -
1.11 - /* Create a new process structure. */
1.12 -
1.13 - process_t process;
1.14 -
1.15 - process_init(&process);
1.16 -
1.17 for (int i = 1; i <= num_processes; i++)
1.18 {
1.19 printf("[%d/%d] Start process...\n", i, num_processes);
1.20
1.21 /* Start a process for the given program. */
1.22
1.23 - err = process_start(&process, argc - 2, (const char **) argv + 2);
1.24 + process_t *process;
1.25 +
1.26 + err = process_spawn(argc - 2, (const char **) argv + 2, &process);
1.27
1.28 if (err)
1.29 {
1.30 @@ -67,19 +59,12 @@
1.31
1.32 printf("Finished program initiation.\n");
1.33
1.34 - /* Subscribe to the process for notifications. */
1.35 -
1.36 - err = notify_subscribe(process_notifiable(&process), NOTIFY_TASK_ALL, notifier);
1.37 -
1.38 - if (err)
1.39 - {
1.40 - printf("Could not subscribe to process: %s\n", l4sys_errtostr(err));
1.41 - return 1;
1.42 - }
1.43 -
1.44 /* Wait for a signal from the process. */
1.45
1.46 - err = process_notify_wait_process(&process, notifier);
1.47 + notify_flags_t flags;
1.48 + notify_values_t values;
1.49 +
1.50 + err = process_wait(process, &flags, &values);
1.51
1.52 if (err)
1.53 {
1.54 @@ -87,16 +72,9 @@
1.55 return 1;
1.56 }
1.57
1.58 - notify_flags_t flags = process_notifications(&process);
1.59 - notify_values_t values = process_notification_values(&process);
1.60 -
1.61 printf("[%d/%d] End process (flags %" pFMTnotify_flags "x values: %ld, %ld)\n", i, num_processes, flags, values.sig, values.val);
1.62 -
1.63 - process_close(&process);
1.64 }
1.65
1.66 - notify_close(notifier);
1.67 -
1.68 printf("End of test.\n");
1.69 return 0;
1.70 }