
This patch fixes a class scheduler semaphore race condition.

The class scheduler depends on semaphores to protect its database from
simultaneous updates.  This patch automatically detects if the semaphore
no longer exists and allocates a new one, allowing the class scheduler to
proceed without interruption.


