What is the barrier or works which confine the water of a stream or canal called?

lock — The barrier or works which confine the water of a stream or canal. (Webster's 1913.)

Sources