- if (rotation_thread_handle) {
- if (rotation_thread_launched) {
- ret = pthread_join(rotation_thread, &status);
- if (ret) {
- errno = ret;
- PERROR("pthread_join rotation thread");
- retval = -1;
- }
- }
- rotation_thread_handle_destroy(rotation_thread_handle);
- }
-
- if (timer_thread_launched) {
- timer_exit();
- ret = pthread_join(timer_thread, &status);
- if (ret) {
- errno = ret;
- PERROR("pthread_join timer thread");
- retval = -1;
- }
- }
-