mirror of
https://github.com/drasko/codezero.git
synced 2026-01-14 03:43:15 +01:00
Wait on working.
Multi-threaded apps can now wait on children to destroy. WAIT_ON is useful when a child exists with an exit code and the pager of the child does not want to take the hassle of destorying it via an ipc. It provides an alternative method of synchronous thread destruction, where the child destroys itself directly rather than the parent issuing a destroy on it explicitly.
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
|
||||
int exit_test_thread(void *arg)
|
||||
{
|
||||
l4_thread_switch(0);
|
||||
l4_exit(0);
|
||||
//l4_thread_switch(0);
|
||||
l4_exit(5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ int exit_test(void)
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Wait on it */
|
||||
printf("Waiting on Thread (%d) to exit.\n", ids.tid);
|
||||
if ((ret = l4_thread_control(THREAD_WAIT, &ids)) >= 0)
|
||||
@@ -54,7 +53,6 @@ int exit_test(void)
|
||||
else
|
||||
printf("Error. Wait on (%d) failed. err = %d\n",
|
||||
ids.tid, ret);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
out_err:
|
||||
|
||||
Reference in New Issue
Block a user