Locking while executing bottom-halves and process context code