diff mbox series

[2/9] libxl: Pointer on usage of libxl__domain_userdata_lock

Message ID 20190409164542.30274-3-anthony.perard@citrix.com (mailing list archive)
State Superseded
Headers show
Series libxl: New slow lock + fix libxl_cdrom_insert with QEMU depriv | expand

Commit Message

Anthony PERARD April 9, 2019, 4:45 p.m. UTC
It is currently difficult to know how/when/why the userdata lock is
supposed to be used. Add some pointers to the hotplug comments.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/libxl/libxl_internal.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ian Jackson June 4, 2019, 4:46 p.m. UTC | #1
Anthony PERARD writes ("[PATCH 2/9] libxl: Pointer on usage of libxl__domain_userdata_lock"):
> It is currently difficult to know how/when/why the userdata lock is
> supposed to be used. Add some pointers to the hotplug comments.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index 98a1ee6159..702acc6d5d 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -4500,6 +4500,12 @@ void libxl__unlock_domain_userdata(libxl__domain_userdata_lock *lock);
>   * data store. The registry entry in libxl private data store
>   * is "libxl-json".
>   * Caller must hold user data lock.
> + *
> + * Other names used for this lock throughout the libxl code are json_lock,
> + * libxl__domain_userdata_lock, "libxl-json", data store lock.
> + *
> + * See comments about libxl__ao_device and "Algorithm for handling device
> + * removal" on how the libxl-json lock / json_lock can be used.

Better grammar for this would be:

  + * See the comment for libxl__ao_device, and "Algorithm for
  + * handling device removal", for information about using the
  + * libxl-json lock / json_lock.

Thanks,
Ian.
diff mbox series

Patch

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 98a1ee6159..702acc6d5d 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -4500,6 +4500,12 @@  void libxl__unlock_domain_userdata(libxl__domain_userdata_lock *lock);
  * data store. The registry entry in libxl private data store
  * is "libxl-json".
  * Caller must hold user data lock.
+ *
+ * Other names used for this lock throughout the libxl code are json_lock,
+ * libxl__domain_userdata_lock, "libxl-json", data store lock.
+ *
+ * See comments about libxl__ao_device and "Algorithm for handling device
+ * removal" on how the libxl-json lock / json_lock can be used.
  */
 int libxl__get_domain_configuration(libxl__gc *gc, uint32_t domid,
                                     libxl_domain_config *d_config);