-
Nadav Har'El authored
the TLS), which led to preempt_counter not being intialized to zero and therefore preemption not being enabled for new threads. Such non-preemptable threads can monopolize their CPU and cause other threads with the misfortune of being assigned to this CPU to never run. This patch adds a simple test reproducing this bug. Because we don't have an implementation of __tls_get_addr(), we can't "extern" a TLS symbol (here sched::preempt_counter) from the test, and so I had to create a new sched::get_preempt_counter() function which I can "extern" from the test.
Nadav Har'El authoredthe TLS), which led to preempt_counter not being intialized to zero and therefore preemption not being enabled for new threads. Such non-preemptable threads can monopolize their CPU and cause other threads with the misfortune of being assigned to this CPU to never run. This patch adds a simple test reproducing this bug. Because we don't have an implementation of __tls_get_addr(), we can't "extern" a TLS symbol (here sched::preempt_counter) from the test, and so I had to create a new sched::get_preempt_counter() function which I can "extern" from the test.