a0, b0,B0Change thread_routine so that each call to "do_work" is atomic, in the sense that no two threads will run do_work simultaniously, and the printouts from one execution of do_work should appear together, like this:
b1,B1
A0
a1,A1
a2,A2
...
a0,A0You CANNOT change the "do_work" routine.
b0,B0
b1,B1
a1,A1
a2,A2
...