This function returns a pointer to the new condition variable if successful. Otherwise, it returns NULL.