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:
Bahadir Balban
2009-11-01 01:03:17 +02:00
parent 0f537ea1f5
commit 5fd0f12017
5 changed files with 48 additions and 23 deletions

View File

@@ -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();