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

[Minios-devel] [UNIKRAFT/LIBPTHREAD-EMBEDDED PATCH] tls-helper: add pteTlsGlobalInitialized



Used in Mimalloc's port to detect availability of TLS.

Signed-off-by: Hugo Lefeuvre <hugo.lefeuvre@xxxxxxxxx>
---
 patches/0011-add-pteTlsGlobalInitialized.patch | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 patches/0011-add-pteTlsGlobalInitialized.patch

diff --git a/patches/0011-add-pteTlsGlobalInitialized.patch 
b/patches/0011-add-pteTlsGlobalInitialized.patch
new file mode 100644
index 0000000..bb967c5
--- /dev/null
+++ b/patches/0011-add-pteTlsGlobalInitialized.patch
@@ -0,0 +1,26 @@
+diff -urNp pthread-patched/platform/helper/tls-helper.c 
pthread-dev/platform/helper/tls-helper.c
+--- pthread-patched/platform/helper/tls-helper.c       2020-02-28 
09:25:46.922415709 +0100
++++ pthread-dev/platform/helper/tls-helper.c   2020-03-01 14:42:41.856370103 
+0100
+@@ -38,6 +38,11 @@ static int maxTlsValues;
+ 
+ pte_osMutexHandle globalTlsLock;
+ 
++int pteTlsGlobalInitialized()
++{
++  return keysUsed != NULL;
++}
++
+ pte_osResult pteTlsGlobalInit(int maxEntries)
+ {
+   int i;
+diff -urNp pthread-patched/platform/helper/tls-helper.h 
pthread-dev/platform/helper/tls-helper.h
+--- pthread-patched/platform/helper/tls-helper.h       2020-02-28 
09:25:46.926416159 +0100
++++ pthread-dev/platform/helper/tls-helper.h   2020-03-01 14:43:05.989262693 
+0100
+@@ -34,6 +34,7 @@
+ /// @todo document..
+ 
+ pte_osResult pteTlsGlobalInit(int maxEntries);
++int pteTlsGlobalInitialized();
+ void * pteTlsThreadInit(void);
+ 
+ pte_osResult pteTlsAlloc(unsigned int *pKey);
-- 
2.7.4


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