summaryrefslogtreecommitdiff
path: root/games-board/crafty/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-board/crafty/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-board/crafty/files')
-rw-r--r--games-board/crafty/files/crafty-24.1-numcpus.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/games-board/crafty/files/crafty-24.1-numcpus.patch b/games-board/crafty/files/crafty-24.1-numcpus.patch
new file mode 100644
index 000000000000..14365cede2a0
--- /dev/null
+++ b/games-board/crafty/files/crafty-24.1-numcpus.patch
@@ -0,0 +1,44 @@
+diff -ru crafty-24.1.org/lock.h crafty-24.1/lock.h
+--- crafty-24.1.org/lock.h 2015-03-10 16:24:09.064539177 +0100
++++ crafty-24.1/lock.h 2015-03-10 17:45:37.675995497 +0100
+@@ -42,6 +42,7 @@
+ * *
+ *******************************************************************************
+ */
++# if defined(__i386__) || defined(__amd64__)
+ static void __inline__ LockX86(volatile int *lock) {
+ int dummy;
+ asm __volatile__(
+@@ -71,17 +72,26 @@
+ :"memory");
+ }
+
+-# define LockInit(p) (p=0)
+-# define LockFree(p) (p=0)
+-# define Unlock(p) (UnlockX86(&p))
+-# define Lock(p) (LockX86(&p))
+-# define lock_t volatile int
+-# endif
++# define LockInit(p) (p=0)
++# define LockFree(p) (p=0)
++# define Unlock(p) (UnlockX86(&p))
++# define Lock(p) (LockX86(&p))
++# define lock_t volatile int
++# else /* Not building for x86 or amd64 platforms */
++# define LockInit(p)
++# define LockFree(p)
++# define Lock(p)
++# define Unlock(p)
++# define Pause()
++# define lock_t volatile int
++# endif /* x86 && amd64 platforms or rest of the world. */
++# endif /* SMP code */
+ #else
+ # define LockInit(p)
+ # define LockFree(p)
+ # define Lock(p)
+ # define Unlock(p)
++# define Pause()
+ # define lock_t volatile int
+ #endif /* SMP code */
+ /* *INDENT-ON* */