Changeset 1871118 in mainline for kernel/generic/src/proc/task.c
- Timestamp:
- 2023-02-10T22:59:11Z (19 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 11d2c983
- Parents:
- daadfa6
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-10 22:53:12)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-10 22:59:11)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/task.c
rdaadfa6 r1871118 385 385 irq_spinlock_lock(&tasks_lock, true); 386 386 irq_spinlock_lock(&TASK->lock, false); 387 irq_spinlock_lock(&threads_lock, false);388 387 389 388 /* Set task name */ 390 389 str_cpy(TASK->name, TASK_NAME_BUFLEN, namebuf); 391 390 392 irq_spinlock_unlock(&threads_lock, false);393 391 irq_spinlock_unlock(&TASK->lock, false); 394 392 irq_spinlock_unlock(&tasks_lock, true); … … 529 527 { 530 528 irq_spinlock_lock(&task->lock, false); 531 irq_spinlock_lock(&threads_lock, false);532 529 533 530 /* … … 536 533 537 534 list_foreach(task->threads, th_link, thread_t, thread) { 538 thread_interrupt(thread, false); 535 thread_t *thr = thread_try_ref(thread); 536 if (thr) 537 thread_interrupt(thr, false); 538 539 // If NULL, the thread is already getting destroyed concurrently with this. 539 540 } 540 541 541 irq_spinlock_unlock(&threads_lock, false);542 542 irq_spinlock_unlock(&task->lock, false); 543 543 }
Note:
See TracChangeset
for help on using the changeset viewer.