allow syscall records to be re-used right after they are handled

This commit is contained in:
Chris Copeland 2022-12-24 16:36:32 -08:00
parent 239b7f047a
commit 3130cce159
Signed by: chrisnc
GPG Key ID: 14550DA72485DF30
1 changed files with 4 additions and 1 deletions

View File

@ -305,6 +305,9 @@ void *rt_syscall_run(void)
memory_order_acquire);
while (record)
{
/* Store the next record in the list now because some syscall records may
* be re-enabled immediately after they are handled. */
struct rt_syscall_record *next_record = record->next;
switch (record->syscall)
{
case RT_SYSCALL_TICK:
@ -397,7 +400,7 @@ void *rt_syscall_run(void)
wake_mutex_waiter(record->args.mutex_unlock.mutex);
break;
}
record = record->next;
record = next_record;
}
return sched();