]> git.proxmox.com Git - mirror_lxc.git/commit
start: don't lock setting the state
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 22 Nov 2017 13:32:56 +0000 (14:32 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 6 Dec 2017 15:01:22 +0000 (16:01 +0100)
commit20144819c4207911ac08654943e4273d7b97f353
tree5925dcbd3917f16bed4ce8fed7263a8f02d2479d
parentf3a2945e8852a50550d00fc3510f669629c28702
start: don't lock setting the state

- setting the handler->state value is atomic on any POSIX implementation since
  we're dealing with an integer (enum/lxc_state_t)
- while the state clients are served it is not possible for lxc_set_state() to
  transition to the next state anyway so there's no danger in moving to the
  next state with clients missing it
- we only care about the list being modified

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c