Skip to content

Commit

Permalink
Update commenst in cpu.c. Fix bug in linked list handling in signal.c.
Browse files Browse the repository at this point in the history
Would have been an issue once more that one signal was in the task's
queue.
  • Loading branch information
KenGordon committed Sep 15, 2020
1 parent 8757429 commit d4d06c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions arch/lkl/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ void lkl_cpu_put(void)

/*
* Debug tool. Essentially allows for assert(cpuLockTaken);
*
* Returns 1 meaning this thread owns the lock, 0 otherwise.
*/

static int lkl_check_cpu_owner()
Expand Down
5 changes: 4 additions & 1 deletion arch/lkl/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ static void handle_signal(struct ksignal *ksig, struct ucontext *uctx)
/*
* Return only the signal of a given number, while snipping it from the list
* Used by the trap handler for sync signals such as SEGV, FPE.
*
* Returns 1 meaning a signal was found, 0 otherwise.
*/
int get_given_ksignal(struct thread_info *task, struct ksignal* sig, int which)
{
Expand Down Expand Up @@ -209,7 +211,8 @@ void append_ksignal_node(struct thread_info *task, struct ksignal *ksig)
task->signal_list_head = node;
task->signal_list_tail = node;
} else { /* otherwise just the tail changes */
ptr->next = node;
ptr->next = node;
task->signal_list_tail = node;
}

spin_unlock(&task->signal_list_lock);
Expand Down

0 comments on commit d4d06c1

Please sign in to comment.