I need help with another Gravity Equilibrium problem

A simple crane consists of a light, rigid rod that is hinged to a wall at one end and tied to the wall with a horizontal cable at the other end, as shown in the diagram below. The rod makes an angle to the wall. At the same end to which the cable is attached there is also a frictionless pulley. The rope that is looped over this pulley is attached to a mass m at one end and is held at the other end so that the weight hangs in equilibrium. Given that the gravitational field is g, what is the tension, T in the horizontal support cable?

[To enter the angle into the formula use the name 'theta' (no quotes).]

A simple crane consists of a light, rigid rod that is hinged to a wall at one end and tied to the wall with a horizontal cable at the other end, as shown in the diagram below. The rod makes an angle to the wall. At the same end to which the cable is attached there is also a frictionless pulley. The rope that is looped over this pulley is attached to a mass m at one end and is held at the other end so that the weight hangs in equilibrium. Given that the gravitational field is g, what is the tension, T in the horizontal support cable?

[To enter the angle into the formula use the name 'theta' (no quotes).]

The tension in the string passing over the pulley = weight of suspended mass $\displaystyle =mg$, so the downward force on the rod exerted by the pulley system = $\displaystyle 2mg$.

Now take moments about the point at which the rod is attached to the wall:

$\displaystyle 2mgl\sin\theta = Tl\cos\theta$, where $\displaystyle l$ is the length of the rod.