Add local patch to fix rtorrent's spinlock implementation.

Submitted by:	kan
This commit is contained in:
Florent Thoumie 2011-06-09 14:38:15 +00:00
parent a8e515d775
commit 09d53e77d5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275277
4 changed files with 24 additions and 2 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= rtorrent-devel
PORTVERSION= 0.8.8
PORTREVISION= 0
PORTREVISION= 1
DISTNAME= ${PORTNAME:S/-devel//}-${PORTVERSION}
MAINTAINER= flz@FreeBSD.org

View file

@ -0,0 +1,11 @@
--- src/thread_base.cc.orig 2011-06-07 12:06:49.729114328 -0400
+++ src/thread_base.cc 2011-06-07 12:07:19.880080780 -0400
@@ -61,7 +61,7 @@
static const unsigned int max_size = 32;
- thread_queue_hack() { std::memset(m_queue, 0, sizeof(thread_queue_hack)); }
+ thread_queue_hack() : m_lock(0) { std::memset(m_queue, 0, sizeof(thread_queue_hack)); }
void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); }
void unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); }

View file

@ -7,7 +7,7 @@
PORTNAME?= rtorrent
PORTVERSION?= 0.8.7
PORTREVISION?= 1
PORTREVISION?= 2
CATEGORIES= net-p2p
MASTER_SITES= http://libtorrent.rakshasa.no/downloads/ \
${MASTER_SITE_LOCAL}

View file

@ -0,0 +1,11 @@
--- src/thread_base.cc.orig 2011-06-07 12:06:49.729114328 -0400
+++ src/thread_base.cc 2011-06-07 12:07:19.880080780 -0400
@@ -61,7 +61,7 @@
static const unsigned int max_size = 32;
- thread_queue_hack() { std::memset(m_queue, 0, sizeof(thread_queue_hack)); }
+ thread_queue_hack() : m_lock(0) { std::memset(m_queue, 0, sizeof(thread_queue_hack)); }
void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); }
void unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); }