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

[Minios-devel] [UNIKRAFT/LIBCXX PATCH] Enable threads support


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Tue, 4 Jun 2019 20:55:06 +0300
  • Cc: felipe.huici@xxxxxxxxx, Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 04 Jun 2019 17:55:25 +0000
  • Ironport-phdr: 9a23:bKWLQx0H19cyfuuBsmDT+DRfVm0co7zxezQtwd8ZseMSKvad9pjvdHbS+e9qxAeQG9mCsrQd0Lud6vm+EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCegbb9oMRm7owHcusYLjYd/K6s61wfErGZPd+lK321jOEidnwz75se+/Z5j9zpftvc8/MNeUqv0Yro1Q6VAADspL2466svrtQLeTQSU/XsTTn8WkhtTDAfb6hzxQ4r8vTH7tup53ymaINH2QLUpUjms86tnVBnlgzocOjUn7G/YlNB/jKNDoBKguRN/xZLUYJqIP/Z6Z6/RYM8WSXZEUstXSidPAJ6zb5EXAuQBI+hWsofzqVgJoxalGQWgGPnixiNSi3PqwaE31fkqHwHc3AwnGtIDqGrZrNLuNKcOUOC1yrTDwzPeb/NOxDf29Y/FfQwmofGXQbJwcMzRxVMrFwPYllWQtJfoMC+O1ugXq2ib8vFvWfi1i24gsgx8pCWkyMQ0ioTRm44YxU3I+T96zYs1P9G0VlB3bNy+HJZery2WKoR7Tt44T2xruCs20KMKtJC1cSQQ1ZgqyADTZvqaeIaS+B3jTvyeITJgiXJgf7Kwmgi9/FC7yu35Ssm0yFFKrjdZktXUtnACyRjT6s+fR/tj+0euwzeP1wTJ5u5YOkA4j7LbK4M6zbIqjJoTtlzPHi7wmErokK+bblgo9+e15+j9YbjrpoWQO5Fqhgz8KKgjlNSzAeEiPQgPW2ib9/681Lrm/UDhXLpKieY2krXYsJDcP8gborO5AxdI0os49xm/FC2q0MwFnXYcNl5FYhWHg5DzO17SOPD4Eeu/g1O0nTduxvDGOLzhApLWLnTajbjuY6h95FBYyAcoydBf5olUCq0aIP7pVU7+qtrYAgU+MwyuzObtEM992Z8GWWKTHq+ZN7vfsVGW6eIrIumMfJEatCz9K/g45v7hkX45lEQbfaa3wZQXbGq3Ee98L0qHfHrmms0BHnsSvgoiUOzqj0WPUSBXZ3moQq0z/is0CIS7AofZWI+tgaaN0zyhEZJLYWBGC02MHGzzd4WYRvcDdTieLdV9nTwfT7ShVpch2gq0uA/gzLo0ZtbTrygZs5Pkz5156vPekTk29CdoFIKN3mfLSHt7zU0SQDpj96dkvU17gnOeybUw1/dfDsBS4bVNTx8nHZXHifRnAZboXVSSLZ+yVF+6T4D+UnkKRdUrzopLOh4lFg==
  • Ironport-sdr: 7obxLl3PcTqM44tCGVPG5WDVZML330+AMD4RZrN9UOVOovVDR9T0Mn1CZPktSkwOqhf9u5K/FX qemm36PMKmYA==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

This patch defines the macros required for enabling threads support in cxx
library.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 Config.uk   | 6 ++++++
 Makefile.uk | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/Config.uk b/Config.uk
index 9962669..16a11dc 100644
--- a/Config.uk
+++ b/Config.uk
@@ -4,3 +4,9 @@ menuconfig LIBCXX
        select LIBCXXABI
        select LIBUNWIND
     default n
+
+if LIBCXX
+config CXX_THREADS
+    bool "Enable CXX threads support"
+    default n
+endif
diff --git a/Makefile.uk b/Makefile.uk
index a455386..b673f72 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -96,6 +96,11 @@ CONFIG_FLAGS         += -D LIBCXX_BUILDING_LIBCXXABI         
\
                -D _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE -D __DYNAMIC_REENT__     
\
 
 
+ifdef CONFIG_CXX_THREADS
+CONFIG_FLAGS += -D__linux__ -D_LIBCPP_HAS_THREAD_API_PTHREAD
+else
+CONFIG_FLAGS += -D_LIBCPP_HAS_NO_THREADS
+endif
 
 LIBCXX_CFLAGS-y    +=   $(CONFIG_FLAGS)
 LIBCXX_CXXFLAGS-y    +=   $(CONFIG_FLAGS)
-- 
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®.