[BACK]Return to patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / www / firefox24 / patches

File: [cvs.NetBSD.org] / pkgsrc / www / firefox24 / patches / Attic / patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc (download)

Revision 1.1, Sun Nov 3 04:51:59 2013 UTC (9 years, 3 months ago) by ryoon
Branch: MAIN
CVS Tags: pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4

Import firefox24-24.1.0 as www/firefox24.

Mozilla Firefox is a free, open-source and cross-platform web browser
for Windows, Linux, MacOS X and many other operating systems.

It is fast and easy to use, and offers many advantages over other web
browsers, such as tabbed browsing and the ability to block pop-up

Firefox also offers excellent bookmark and history management, and it
can be extended by developers using industry standards such as XML,
CSS, JavaScript, C++, etc. Many extensions are available.

This package tracks 24 extended support release branch.

$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc,v 1.1 2013/11/03 04:51:59 ryoon Exp $

--- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc.orig	2013-09-10 03:43:47.000000000 +0000
+++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
@@ -272,7 +272,7 @@ bool ThreadPosix::Start(unsigned int& th
 // CPU_ZERO and CPU_SET are not available in NDK r7, so disable
 // SetAffinity on Android for now.
-#if defined(__FreeBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK)))
+#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK)))
 bool ThreadPosix::SetAffinity(const int* processor_numbers,
                               const unsigned int amount_of_processors) {
   if (!processor_numbers || (amount_of_processors == 0)) {
@@ -280,20 +280,34 @@ bool ThreadPosix::SetAffinity(const int*
 #if defined(__FreeBSD__)
   cpuset_t mask;
+#elif defined(__NetBSD__)
+  cpuset_t *mask;
   cpu_set_t mask;
+#if defined(__NetBSD__)
+  cpuset_zero(mask);
   for (unsigned int processor = 0;
        processor < amount_of_processors;
        ++processor) {
+#if defined(__NetBSD__)
+    cpuset_set(processor_numbers[processor], mask);
     CPU_SET(processor_numbers[processor], &mask);
 #if defined(__FreeBSD__)
   const int result = pthread_setaffinity_np(thread_,
+#elif defined(__NetBSD__)
+  const int result = pthread_setaffinity_np(thread_,
+                             sizeof(mask),
+                             mask);
 #elif defined(WEBRTC_ANDROID) || defined(WEBRTC_GONK)
   // Android.
   const int result = syscall(__NR_sched_setaffinity,