[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v2 2/3] lib/uklock: introduce mutex_is_locked




Reviewed-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>


On 1/30/19 5:43 PM, Sharan Santhanam wrote:
Hello Yuri,

Please find the comments inline.

Thanks & Regards
Sharan

On 1/9/19 12:33 PM, Yuri Volchkov wrote:
Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
  lib/uklock/include/uk/mutex.h | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/lib/uklock/include/uk/mutex.h b/lib/uklock/include/uk/mutex.h
index 96635f6b..88540eca 100644
--- a/lib/uklock/include/uk/mutex.h
+++ b/lib/uklock/include/uk/mutex.h
@@ -91,6 +91,11 @@ static inline int uk_mutex_trylock(struct uk_mutex *m)
      return ret;
  }
+static inline int uk_mutex_is_locked(struct uk_mutex *m)
+{
+    return m->locked;
Don't we need an atomic operation while reading the counter?
We do not need it in this case.

+}
+
  static inline void uk_mutex_unlock(struct uk_mutex *m)
  {
      unsigned long irqf;


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.