|
From: Ivo R. <iv...@iv...> - 2016-02-10 01:55:20
|
2016-02-09 19:57 GMT+01:00 William Good <app...@li...>: > Kind thanks for your response. From reading Philippe's slides I see that > a thread will release the big lock "After it has executed 100K basic > blocks". This does not necessarily guarantee that there will be no > context switches inside my helper function (addStmtToIRSB( sbOut, > IRStmt_Dirty(di) ). It seems like a lock is still necessary to protect my > data structure. If this is the case how do I go about protecting my table > from thread races? > I assume your helper function is called from within the translated code, right? Then your helper is always executed within a context of a basic block. And the big lock guarantees that no context switch happens during the invocation of a basic block. If that was not the case, we would be in a huge trouble today. I. |