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

[Minios-devel] [UNIKRAFT/PTHREAD-EMBEDDED PATCH 1/1] Add != operator for pte_handle_t


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Sat, 9 Nov 2019 10:21:29 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WCx5T1BqTgqiVBJwTQOPUXhl0fzYsyUcP1594f1t+wU=; b=MIKKhyd0Kphlmf8l5gWeNGMhKTSzTKYfs6KGBHtWCLM9yvmx/juXRPb1I10k562G6/iLxVKvSLrfYILVCT8i+agI4W3pm3Glcj4jNq3dVZ6vSjdTXZ3dTlsO9Cmv5WbIIDe0WhXYltb7uHYy2wbKCgaosimDGCgYuJogQBqix7/kzkTT+tBpWYv0tYa4KcleYHLGdYFfM4AfLrhHwjXrkSOSjqwDXi3pdYvlgVCByVxSgqYXWDt2MpYba6LmA9lio3BcioL72IDfV0cQHkMcNYCGKkoOFWiVk5Bkpk3udukpPgl+4jctx8KeR6A3TJLRDnQiAO+6Yo75T5cJ70waKA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dEZ3yQEEv3ZOfa2grwmy9IGGV49ceugV9ZqLOwbClajBW8Pj75CxU0iHt4Ib9TSdK93jegzf3n8MXDo6wegzAxyl17e3Q6ydtic+KnerIxklngOgG71jAG3p0GIB7sW5loXdePBIREFJyYnBaceBB5TVYTYmBMww5UPjgd4ORl2fVdXAN4P7IFlFgiWmuD8GEMR2Y1XLwAeSGLzbeXtD2bvh+kggKVXJ6yycz7v/j3aJZ/mNdmLAr4vCy0y7xkVz8w2vHwBXp3+Gpu8HDpRObN/1XDVz87QYhpswbRCSpjb8yHt9QaQNZnEoaL8zgXp/u/zqf0x4FRSLMgkD0y4eGg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>, "costin.lupu@xxxxxxxxx" <costin.lupu@xxxxxxxxx>
  • Delivery-date: Sat, 09 Nov 2019 10:21:42 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVludzkprP3fjkVECIRNQubpQIwg==
  • Thread-topic: [UNIKRAFT/PTHREAD-EMBEDDED PATCH 1/1] Add != operator for pte_handle_t

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 ...0010-Added-operator-for-pte_handle_t.patch | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 patches/0010-Added-operator-for-pte_handle_t.patch

diff --git a/patches/0010-Added-operator-for-pte_handle_t.patch 
b/patches/0010-Added-operator-for-pte_handle_t.patch
new file mode 100644
index 0000000..7272b74
--- /dev/null
+++ b/patches/0010-Added-operator-for-pte_handle_t.patch
@@ -0,0 +1,49 @@
+From 5b15a35b6bcc0cce17850a51ffad825a577bd219 Mon Sep 17 00:00:00 2001
+From: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+Date: Sat, 9 Nov 2019 01:12:33 +0200
+Subject: [PATCH 1/1] Added operator != for pte_handle_t
+
+Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+---
+ pthread.h | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/pthread.h b/pthread.h
+index 48625a4..da0c722 100644
+--- a/pthread.h
++++ b/pthread.h
+@@ -406,6 +406,7 @@ enum
+         }
+         inline struct pte_handle& operator=(unsigned int ptr_value);
+         inline bool operator==(int ptr_value);
++       inline bool operator!=(int ptr_value);
+ #endif
+       } pte_handle_t;
+ 
+@@ -1010,12 +1011,23 @@ enum
+         return ((size_t) l.p) == ((size_t) r.p);
+     }
+ 
++    /* Operator to be compatible to libstd++ */
++    inline bool operator!=(pte_handle_t const& l, pte_handle_t const& r)
++    {
++        return ((size_t) l.p) != ((size_t) r.p);
++    }
++
+     /* Operator to compare the thread pointer with a given value */
+     bool pte_handle_t::operator==(int ptr_value)
+     {
+         return ((size_t) this->p) == ((size_t) (reinterpret_cast <void 
*>(ptr_value)));
+     }
+ 
++    bool pte_handle_t::operator!=(int ptr_value)
++    {
++        return ((size_t) this->p) != ((size_t) (reinterpret_cast <void 
*>(ptr_value)));
++    }
++
+     /* Operator to assign a given value to the thread pointer */
+     pte_handle_t& pte_handle_t::operator=(unsigned int ptr_value)
+     {
+-- 
+2.20.1
+
-- 
2.20.1


_______________________________________________
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®.