Removed a bad const reference usage.
Indentation fix.
Renamed alt_buf_lock_t to buf_lock_t.
Renamed alt_buf_read_t to buf_read_t, renamed alt_buf_write_t to buf_write_t.