Locks implemented as structure