Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 2019 00:29:53 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r508221 - in head/emulators/rpcs3: . files
Message-ID:  <201908060029.x760TrM6041860@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Aug  6 00:29:53 2019
New Revision: 508221
URL: https://svnweb.freebsd.org/changeset/ports/508221

Log:
  emulators/rpcs3: update to 0.0.6.8443
  
  Changes:	https://github.com/RPCS3/rpcs3/compare/e40b76b25...05813c7e9

Added:
  head/emulators/rpcs3/files/extra-patch-revert-5bd17a44c972   (contents, props changed)
Modified:
  head/emulators/rpcs3/Makefile   (contents, props changed)
  head/emulators/rpcs3/distinfo   (contents, props changed)

Modified: head/emulators/rpcs3/Makefile
==============================================================================
--- head/emulators/rpcs3/Makefile	Mon Aug  5 23:37:31 2019	(r508220)
+++ head/emulators/rpcs3/Makefile	Tue Aug  6 00:29:53 2019	(r508221)
@@ -2,9 +2,8 @@
 
 PORTNAME=	rpcs3
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.0.6-8435 # git rev-list --count HEAD
-DISTVERSIONSUFFIX=	-ge40b76b25
-PORTREVISION=	1
+DISTVERSION=	0.0.6-8443 # git rev-list --count HEAD
+DISTVERSIONSUFFIX=	-g05813c7e9
 CATEGORIES=	emulators
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -47,6 +46,7 @@ LDFLAGS+=	-Wl,--as-needed # GLU
 # XXX Remove after FreeBSD 11.2/12.0 reach EOL i.e., around 2020-02-01
 .if !exists(/usr/include/c++/v1/charconv) && exists(/usr/lib/libc++.so)
 EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-revert-f9ad6358563b
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-revert-5bd17a44c972
 .endif
 
 OPTIONS_DEFINE=	ALSA EVDEV GDB LLVM PULSEAUDIO VULKAN

Modified: head/emulators/rpcs3/distinfo
==============================================================================
--- head/emulators/rpcs3/distinfo	Mon Aug  5 23:37:31 2019	(r508220)
+++ head/emulators/rpcs3/distinfo	Tue Aug  6 00:29:53 2019	(r508221)
@@ -1,6 +1,6 @@
-TIMESTAMP = 1564426684
-SHA256 (RPCS3-rpcs3-v0.0.6-8435-ge40b76b25_GH0.tar.gz) = 6a4eaceb45c42a4dd55956fb00f051ee5aa5d74e18834732885b3a9d8f863043
-SIZE (RPCS3-rpcs3-v0.0.6-8435-ge40b76b25_GH0.tar.gz) = 5531115
+TIMESTAMP = 1564942579
+SHA256 (RPCS3-rpcs3-v0.0.6-8443-g05813c7e9_GH0.tar.gz) = 14dff0e16d94ff3068bc6a79aa7e37fe8ce1286a456423fa4a0b3a4844c0ae4b
+SIZE (RPCS3-rpcs3-v0.0.6-8443-g05813c7e9_GH0.tar.gz) = 5532101
 SHA256 (RPCS3-hidapi-hidapi-0.8.0-rc1-27-g9220f5e_GH0.tar.gz) = 3120e0b701943f452760e45f9fc1ac50bab356ad4c807b4cac4598041c5ca1a5
 SIZE (RPCS3-hidapi-hidapi-0.8.0-rc1-27-g9220f5e_GH0.tar.gz) = 105400
 SHA256 (RPCS3-llvm-b860b5e8f4ee_GH0.tar.gz) = c151972a0c8ceac568c24b61e63d2ecbdac0f125185e23fc2238e0a14048256e

Added: head/emulators/rpcs3/files/extra-patch-revert-5bd17a44c972
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/rpcs3/files/extra-patch-revert-5bd17a44c972	Tue Aug  6 00:29:53 2019	(r508221)
@@ -0,0 +1,160 @@
+rpcs3/util/atomic.cpp:55:51: error: no type named 'node_type' in 'std::__1::multimap<const void *, (anonymous namespace)::waiter, std::__1::less<const void *>, std::__1::allocator<std::__1::pair<const void *const, (anonymous namespace)::waiter> > >'; did you mean 'size_type'?
+        thread_local std::multimap<const void*, waiter>::node_type s_tls_waiter = []()
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
+                                                         size_type
+/usr/include/c++/v1/map:1507:60: note: 'size_type' declared here
+    typedef typename __alloc_traits::size_type             size_type;
+                                                           ^
+rpcs3/util/atomic.cpp:59:16: error: no member named 'extract' in 'std::__1::multimap<const void *, (anonymous namespace)::waiter, std::__1::less<const void *>, std::__1::allocator<std::__1::pair<const void *const, (anonymous namespace)::waiter> > >'
+                return dummy.extract(dummy.emplace(nullptr, &s_tls_waiter));
+                       ~~~~~ ^
+rpcs3/util/atomic.cpp:55:61: error: cannot initialize a variable of type 'std::multimap<const void *, waiter>::size_type' (aka 'unsigned long') with an rvalue of type 'void'
+        thread_local std::multimap<const void*, waiter>::node_type s_tls_waiter = []()
+                                                                   ^              ~~~~
+rpcs3/util/atomic.cpp:92:69: error: no type named 'node_type' in 'std::__1::multimap<const void *, (anonymous namespace)::waiter, std::__1::less<const void *>, std::__1::allocator<std::__1::pair<const void *const, (anonymous namespace)::waiter> > >'; did you mean 'size_type'?
+                const auto ptls = static_cast<std::multimap<const void*, waiter>::node_type*>(found->second.tls_ptr);
+                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
+                                                                                  size_type
+/usr/include/c++/v1/map:1507:60: note: 'size_type' declared here
+    typedef typename __alloc_traits::size_type             size_type;
+                                                           ^
+rpcs3/util/atomic.cpp:93:21: error: no member named 'extract' in 'std::__1::multimap<const void *, (anonymous namespace)::waiter, std::__1::less<const void *>, std::__1::allocator<std::__1::pair<const void *const, (anonymous namespace)::waiter> > >'
+                *ptls = wmap.list.extract(found);
+                        ~~~~~~~~~ ^
+rpcs3/util/atomic.cpp:94:7: error: member reference base type 'unsigned long' is not a structure or union
+                ptls->mapped().cond.notify_one();
+                ~~~~^ ~~~~~~
+
+--- rpcs3/util/atomic.cpp.orig	2019-08-04 18:16:19 UTC
++++ rpcs3/util/atomic.cpp
+@@ -2,10 +2,6 @@
+ 
+ #include "Utilities/sync.h"
+ 
+-#include <map>
+-#include <mutex>
+-#include <condition_variable>
+-
+ // Should be at least 65536, currently 2097152.
+ static constexpr std::uintptr_t s_hashtable_size = 1u << 21;
+ 
+@@ -31,113 +27,6 @@ static inline bool ptr_cmp(const void* data, std::size_t size, u64 old_value)
+ 	return false;
+ }
+ 
+-// Fallback implementation
+-namespace
+-{
+-	struct waiter
+-	{
+-		std::condition_variable cond;
+-		void* const tls_ptr;
+-
+-		explicit waiter(void* tls_ptr)
+-			: tls_ptr(tls_ptr)
+-		{
+-		}
+-	};
+-
+-	struct waiter_map
+-	{
+-		std::mutex mutex;
+-		std::multimap<const void*, waiter> list;
+-	};
+-
+-	// Thread's unique node to insert without allocation
+-	thread_local std::multimap<const void*, waiter>::node_type s_tls_waiter = []()
+-	{
+-		// Initialize node from a dummy container (there is no separate node constructor)
+-		std::multimap<const void*, waiter> dummy;
+-		return dummy.extract(dummy.emplace(nullptr, &s_tls_waiter));
+-	}();
+-
+-	waiter_map& get_fallback_map(const void* ptr)
+-	{
+-		static waiter_map s_waiter_maps[4096];
+-
+-		return s_waiter_maps[std::hash<const void*>()(ptr) % std::size(s_waiter_maps)];
+-	}
+-
+-	void fallback_wait(const void* data, std::size_t size, u64 old_value)
+-	{
+-		auto& wmap = get_fallback_map(data);
+-
+-		// Update node key
+-		s_tls_waiter.key() = data;
+-
+-		if (std::unique_lock lock(wmap.mutex); ptr_cmp(data, size, old_value))
+-		{
+-			// Add node to the waiter list
+-			std::condition_variable& cond = wmap.list.insert(std::move(s_tls_waiter))->second.cond;
+-
+-			// Wait until the node is returned to its TLS location
+-			while (!s_tls_waiter)
+-			{
+-				cond.wait(lock);
+-			}
+-		}
+-	}
+-
+-	void fallback_notify(waiter_map& wmap, std::multimap<const void*, waiter>::iterator found)
+-	{
+-		// Return notified node to its TLS location
+-		const auto ptls = static_cast<std::multimap<const void*, waiter>::node_type*>(found->second.tls_ptr);
+-		*ptls = wmap.list.extract(found);
+-		ptls->mapped().cond.notify_one();
+-	}
+-
+-	void fallback_notify_one(const void* data)
+-	{
+-		auto& wmap = get_fallback_map(data);
+-
+-		std::lock_guard lock(wmap.mutex);
+-
+-		if (auto found = wmap.list.find(data); found != wmap.list.end())
+-		{
+-			fallback_notify(wmap, found);
+-		}
+-	}
+-
+-	void fallback_notify_all(const void* data)
+-	{
+-		auto& wmap = get_fallback_map(data);
+-
+-		std::lock_guard lock(wmap.mutex);
+-
+-		for (auto it = wmap.list.lower_bound(data); it != wmap.list.end() && it->first == data;)
+-		{
+-			fallback_notify(wmap, it++);
+-		}
+-	}
+-}
+-
+-#if !defined(_WIN32) && !defined(__linux__)
+-
+-void atomic_storage_futex::wait(const void* data, std::size_t size, u64 old_value)
+-{
+-	fallback_wait(data, size, old_value);
+-}
+-
+-void atomic_storage_futex::notify_one(const void* data)
+-{
+-	fallback_notify_one(data);
+-}
+-
+-void atomic_storage_futex::notify_all(const void* data)
+-{
+-	fallback_notify_all(data);
+-}
+-
+-#else
+-
+ void atomic_storage_futex::wait(const void* data, std::size_t size, u64 old_value)
+ {
+ #ifdef _WIN32
+@@ -337,5 +226,3 @@ void atomic_storage_futex::notify_all(const void* data)
+ 	}
+ #endif
+ }
+-
+-#endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908060029.x760TrM6041860>