pwm pthread