1. An apparatus, comprising: a processor; a non-transitory, computer-readable storage medium coupled to the processor; and logic, stored on the computer-readable storage medium and executed on the processor, for: detecting, by a processing thread, when the processing thread has entered a shared library; setting, in an operating system (OS) and in response to the detecting, a thread flag corresponding to the thread; detecting an OS flag, set by the OS, indicating that the OS is updating the shared library; in response to detecting the OS flag, suspending processing by the processing thread and transferring control from the thread to the OS; resuming processing by the processing thread in response to detecting that the OS has completed the updating; and executing the shared library in response to the resuming.