Add mutex and data fields to context struct