mirror of
https://github.com/drasko/codezero.git
synced 2026-02-26 16:53:14 +01:00
Added handling of task pending events from scheduler.
Previously all pending events were handled on return of exceptions in process context. This was causing threads that run in userspace and take no exceptions not handle their pending events indefinitely. Now scheduler handles them in irq context as well.
This commit is contained in:
@@ -15,8 +15,10 @@
|
||||
|
||||
int exit_test_thread(void *arg)
|
||||
{
|
||||
while (1)
|
||||
;
|
||||
//l4_thread_switch(0);
|
||||
l4_exit(5);
|
||||
//l4_exit(5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -36,7 +38,6 @@ int exit_test(void)
|
||||
|
||||
// l4_thread_switch(0);
|
||||
|
||||
#if 0
|
||||
/* Kill it */
|
||||
printf("Killing Thread (%d).\n", ids.tid);
|
||||
if ((ret = l4_thread_control(THREAD_DESTROY, &ids)) < 0)
|
||||
@@ -44,8 +45,8 @@ int exit_test(void)
|
||||
else
|
||||
printf("Success: Killed Thread (%d)\n", ids.tid);
|
||||
|
||||
#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,6 +55,7 @@ int exit_test(void)
|
||||
printf("Error. Wait on (%d) failed. err = %d\n",
|
||||
ids.tid, ret);
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
out_err:
|
||||
BUG();
|
||||
|
||||
Reference in New Issue
Block a user