So started at 6:30 and took Dillon to daycare. Then tried to start on time. Basically spent about three quarters of the day tracing one bug. In the end it turned out to be a problem with an event. So here is the scenario. You have a thread that adds jobs to a ring buffer. It also increments a job count using an atomic. So if its the first job then it resets an event. Then pushes the job on to a queue. When the job is processed it decrements the count, if it’s zero then it triggers the event. The bug was to do with the event, the increment/decrement is atomic, but there may be a context switch before the event stuff, so it’s possible the event may remain triggered. Which was causing no end of fun. Fixed that. Picked up Dillon.
Went to the gym and did Pump. Then came back and had to fix yet another event problem.
Looking forward to a dull day tomorrow.