Hello, I constructed another small script variant for the semantic patch language. @replacement disable decl_init@ expression action, e, value; expression list el; identifier rc; @@ -int rc; ... when != rc = value when any -mutex_lock +guard(mutex) (&e); -rc = action(el); -mutex_unlock(&e); return - rc + action(el) ; I tried this SmPL script example out on source code from the software “Linux next-20240523”. 425 source files were found where some function implementations could be adjusted also according to the application of mutual exclusion. Will it become helpful to offer further SmPL script variants which can be used together with the tool “coccicheck”? Regards, Markus