Changeset 33e15a0 in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2024-01-21T15:36:03Z (12 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
11909ce3
Parents:
7364e2d1
Message:

Make thread→btrace weakly atomic, to avoid need for thread lock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/thread.c

    r7364e2d1 r33e15a0  
    289289#ifdef CONFIG_UDEBUG
    290290        /* Initialize debugging stuff */
    291         thread->btrace = false;
     291        atomic_init(&thread->btrace, false);
    292292        udebug_thread_initialize(&thread->udebug);
    293293#endif
     
    908908
    909909        printf("Scheduling thread stack trace.\n");
    910         irq_spinlock_lock(&thread->lock, true);
    911         thread->btrace = true;
    912         irq_spinlock_unlock(&thread->lock, true);
     910        atomic_set_unordered(&thread->btrace, true);
    913911
    914912        thread_wakeup(thread);
Note: See TracChangeset for help on using the changeset viewer.