Implement ser_setstatus and ser_getstatus as functions to avoid race conditions.