I have never personally found the need to implemented the Lua lock calls yet whilst looking through 5.1.4 the implementation of lua_xmove[1] caught my attention. The function would seem to indicate that lua_lock when used should be something like the following operating on a mutex stored in global_State, is this correct?
lock_mutex(G(L)->mutex)
If this is not the case I would think lua_xmove would have problems for not locking 'from' when it's data maybe changed by another thread during the function call.