On 02/10/21(Sat) 21:09, Mark Kettenis wrote:
> > Date: Sat, 2 Oct 2021 20:35:41 +0200
> > From: Martin Pieuchot
> > [...]
> > There's no sleeping point but a call to wakeup(). This wakeup() is
> > supposed to wake a btrace(8) process. But if the curproc, which just
> > added itself to the
On Sat, Oct 2, 2021 at 8:57 AM Martin Pieuchot wrote:
> When a thread running on a CPU schedules itself out, it does the following
> (pseudo_code):
>
> SCHED_LOCK()
> curproc->p_stat = SSLEEP;
> // some more operations
> mi_switch()
>
> The problem with this is
> Date: Sat, 2 Oct 2021 20:35:41 +0200
> From: Martin Pieuchot
>
> On 02/10/21(Sat) 20:24, Mark Kettenis wrote:
> > > Date: Sat, 2 Oct 2021 19:55:49 +0200
> > > From: Martin Pieuchot
> > >
> > > When a thread running on a CPU schedules itself out, it does the following
> > > (pseudo_code):
> >
On 02/10/21(Sat) 20:24, Mark Kettenis wrote:
> > Date: Sat, 2 Oct 2021 19:55:49 +0200
> > From: Martin Pieuchot
> >
> > When a thread running on a CPU schedules itself out, it does the following
> > (pseudo_code):
> >
> > SCHED_LOCK()
> > curproc->p_stat = SSLEEP;
> > // some more
> Date: Sat, 2 Oct 2021 19:55:49 +0200
> From: Martin Pieuchot
>
> When a thread running on a CPU schedules itself out, it does the following
> (pseudo_code):
>
> SCHED_LOCK()
> curproc->p_stat = SSLEEP;
> // some more operations
> mi_switch()
>
> The problem with this
When a thread running on a CPU schedules itself out, it does the following
(pseudo_code):
SCHED_LOCK()
curproc->p_stat = SSLEEP;
// some more operations
mi_switch()
The problem with this is that any instrumentation between setting `p_stat'
and cpu_switchto() is