[haiku-commits] haiku.r1alpha4: hrevr1alpha4-44600 - build/jam src/system/kernel/slab src/add-ons/kernel/busses/scsi/ahci src/add-ons/kernel/file_systems/bfs

  • From: leavengood@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 15 Sep 2012 06:41:51 +0200 (CEST)

hrevr1alpha4-44600 adds 11 changesets to branch 'r1alpha4'
old head: c7bf5e093f960d75cd08192c885427d0aaeafc77
new head: b3bfaea495249db96e7c8192870f25c9e7acb8b8

----------------------------------------------------------------------------

636bf60: Use implemented ports mask to check if maximum port count needs to be 
extended.
  
   * This should fix #8953
   * Also fix some harmless off-by-one errors

                                  [ Marcus Overhagen <marcus@xxxxxxxxxxxx> ]

f937009: Fix crash in MemoryManager::PerformMaintenance()
  
  sFreeAreaCount wasn't decremented after removing an area from
  sFreeAreas, thus causing the loop to continue until enountering and
  crashing on a NULL pointer after removing the last area. Introduce
  helper methods _PushFreeArea() and _PopFreeArea() to ensure this cannot
  easily happen again.
  
  Fixes ticket #8972.

                                    [ Ingo Weinhold <ingo_weinhold@xxxxxx> ]

43b331d: Updated several more OptionalPackages

                                     [ Scott McCreary <scottmc2@xxxxxxxxx> ]

b87ff1a: Rebuilf beam and transmission gcc4 packages

                                     [ Scott McCreary <scottmc2@xxxxxxxxx> ]

8ce8ccf: Run the transaction flusher in another thread.
  
  * This fixes bug #8977.

                                   [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]

797a822: DevelopmentMin optional package: add 3rdparty headers
  
  * Add freetype, libpng and jpeg headers

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

df101c7: Rebuilt some more packages mostly to fix directory issues.

                                     [ Scott McCreary <scottmc2@xxxxxxxxx> ]

8777466: VM Preflet: Use AutoDeleter on the settings
  
  * Prevents a minor memory leak
  * Thanks for catching this Axel!

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

54ad750: Add OptionalPackage Nanumfont, a Korean monospace font

                                     [ Scott McCreary <scottmc2@xxxxxxxxx> ]

fef1802: Add OptionalPackage Droid, font from Google's Android project

                                     [ Scott McCreary <scottmc2@xxxxxxxxx> ]

b3bfaea: Don't call unload_driver_settings twice. Thanks Hamish.

                                  [ Ryan Leavengood <leavengood@xxxxxxxxx> ]

----------------------------------------------------------------------------

10 files changed, 148 insertions(+), 63 deletions(-)
build/jam/OptionalLibPackages                      |   36 +++----
build/jam/OptionalPackages                         |   81 +++++++++++-----
.../kernel/busses/scsi/ahci/ahci_controller.cpp    |   15 ++-
src/add-ons/kernel/busses/scsi/ahci/util.cpp       |   14 +++
src/add-ons/kernel/busses/scsi/ahci/util.h         |    2 +
src/add-ons/kernel/file_systems/bfs/Journal.cpp    |   14 ++-
src/add-ons/kernel/file_systems/bfs/Journal.h      |    2 +
src/preferences/virtualmemory/Settings.cpp         |    4 +-
src/system/kernel/slab/MemoryManager.cpp           |   20 ++--
src/system/kernel/slab/MemoryManager.h             |   23 +++++

############################################################################

Commit:      636bf60b15a1d0f752356c66d15abecf7447d649
URL:         http://cgit.haiku-os.org/haiku/commit/?id=636bf60
Author:      Marcus Overhagen <marcus@xxxxxxxxxxxx>
Date:        Mon Sep 10 20:32:20 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:45 2012 UTC

Ticket:      https://dev.haiku-os.org/ticket/8953

Use implemented ports mask to check if maximum port count needs to be extended.

 * This should fix #8953
 * Also fix some harmless off-by-one errors

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/busses/scsi/ahci/ahci_controller.cpp 
b/src/add-ons/kernel/busses/scsi/ahci/ahci_controller.cpp
index e7bc95a..24ded54 100644
--- a/src/add-ons/kernel/busses/scsi/ahci/ahci_controller.cpp
+++ b/src/add-ons/kernel/busses/scsi/ahci/ahci_controller.cpp
@@ -131,12 +131,21 @@ AHCIController::Init()
        fPortCountMax = 1 + ((fRegs->cap >> CAP_NP_SHIFT) & CAP_NP_MASK);
 
        fPortImplementedMask = fRegs->pi;
+       // reported mask of implemented ports is sometimes empty
        if (fPortImplementedMask == 0) {
                fPortImplementedMask = 0xffffffff >> (32 - fPortCountMax);
                TRACE("ports-implemented mask is zero, using 0x%" B_PRIx32 " 
instead.\n",
                        fPortImplementedMask);
        }
 
+       // reported number of ports is sometimes too small
+       int maxPortIndex;
+       maxPortIndex = fls(fPortImplementedMask);
+       if (fPortCountMax < maxPortIndex) {
+               TRACE("reported number of ports is wrong, using %d instead.\n", 
maxPortIndex);
+               fPortCountMax = maxPortIndex;
+       }
+
        fPortCountAvail = count_bits_set(fPortImplementedMask);
 
        TRACE("cap: Interface Speed Support: generation %" B_PRIu32 "\n",       
(fRegs->cap >> CAP_ISS_SHIFT) & CAP_ISS_MASK);
@@ -169,7 +178,7 @@ AHCIController::Init()
                goto err;
        }
 
-       for (int i = 0; i <= fPortCountMax; i++) {
+       for (int i = 0; i < fPortCountMax; i++) {
                if (fPortImplementedMask & (1 << i)) {
                        fPort[i] = new (std::nothrow)AHCIPort(this, i);
                        if (!fPort[i]) {
@@ -189,7 +198,7 @@ AHCIController::Init()
        fRegs->ghc |= GHC_IE;
        FlushPostedWrites();
 
-       for (int i = 0; i <= fPortCountMax; i++) {
+       for (int i = 0; i < fPortCountMax; i++) {
                if (fPort[i]) {
                        status_t status = fPort[i]->Init2();
                        if (status < B_OK) {
@@ -215,7 +224,7 @@ AHCIController::Uninit()
 {
        TRACE("AHCIController::Uninit\n");
 
-       for (int i = 0; i <= fPortCountMax; i++) {
+       for (int i = 0; i < fPortCountMax; i++) {
                if (fPort[i]) {
                        fPort[i]->Uninit();
                        delete fPort[i];
diff --git a/src/add-ons/kernel/busses/scsi/ahci/util.cpp 
b/src/add-ons/kernel/busses/scsi/ahci/util.cpp
index d630d9f..ff58f82 100644
--- a/src/add-ons/kernel/busses/scsi/ahci/util.cpp
+++ b/src/add-ons/kernel/busses/scsi/ahci/util.cpp
@@ -121,3 +121,17 @@ swap_words(void *data, size_t size)
                word++;
        }
 }
+
+
+int
+fls(unsigned mask)
+{
+       if (mask == 0)
+               return 0;
+       int pos = 1;
+       while (mask != 1) {
+               mask >>= 1;
+               pos++;
+       }
+       return pos;
+}
diff --git a/src/add-ons/kernel/busses/scsi/ahci/util.h 
b/src/add-ons/kernel/busses/scsi/ahci/util.h
index 94fc1ac..75b4f9d 100644
--- a/src/add-ons/kernel/busses/scsi/ahci/util.h
+++ b/src/add-ons/kernel/busses/scsi/ahci/util.h
@@ -20,6 +20,8 @@ status_t sg_memcpy(const physical_entry *sgTable, int 
sgCount, const void *data,
 
 void swap_words(void *data, size_t size);
 
+int fls(unsigned mask);
+
 #ifdef __cplusplus
 }
 #endif

############################################################################

Commit:      f93700929e66c576a01e8e490a69fce763e8fd11
URL:         http://cgit.haiku-os.org/haiku/commit/?id=f937009
Author:      Ingo Weinhold <ingo_weinhold@xxxxxx>
Date:        Tue Sep 11 20:31:19 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:46 2012 UTC

Ticket:      https://dev.haiku-os.org/ticket/8972

Fix crash in MemoryManager::PerformMaintenance()

sFreeAreaCount wasn't decremented after removing an area from
sFreeAreas, thus causing the loop to continue until enountering and
crashing on a NULL pointer after removing the last area. Introduce
helper methods _PushFreeArea() and _PopFreeArea() to ensure this cannot
easily happen again.

Fixes ticket #8972.

----------------------------------------------------------------------------

diff --git a/src/system/kernel/slab/MemoryManager.cpp 
b/src/system/kernel/slab/MemoryManager.cpp
index 3a6ac26..1f1fa8e 100644
--- a/src/system/kernel/slab/MemoryManager.cpp
+++ b/src/system/kernel/slab/MemoryManager.cpp
@@ -22,7 +22,6 @@
 #include "kernel_debug_config.h"
 
 #include "ObjectCache.h"
-#include "slab_private.h"
 
 
 //#define TRACE_MEMORY_MANAGER
@@ -849,15 +848,13 @@ MemoryManager::PerformMaintenance()
                        if (_AllocateArea(0, area) != B_OK)
                                return;
 
-                       _push(sFreeAreas, area);
-                       if (++sFreeAreaCount > 2)
+                       _PushFreeArea(area);
+                       if (sFreeAreaCount > 2)
                                sMaintenanceNeeded = true;
                } else {
                        // free until we only have two free ones
-                       while (sFreeAreaCount > 2) {
-                               Area* area = _pop(sFreeAreas);
-                               _FreeArea(area, true, 0);
-                       }
+                       while (sFreeAreaCount > 2)
+                               _FreeArea(_PopFreeArea(), true, 0);
 
                        if (sFreeAreaCount == 0)
                                sMaintenanceNeeded = true;
@@ -956,8 +953,7 @@ MemoryManager::_AllocateChunks(size_t chunkSize, uint32 
chunkCount,
                return B_OK;
 
        if (sFreeAreas != NULL) {
-               _AddArea(_pop(sFreeAreas));
-               sFreeAreaCount--;
+               _AddArea(_PopFreeArea());
                _RequestMaintenance();
 
                _GetChunks(metaChunkList, chunkSize, chunkCount, _metaChunk, 
_chunk);
@@ -1409,16 +1405,14 @@ MemoryManager::_FreeArea(Area* area, bool areaRemoved, 
uint32 flags)
 
        // We want to keep one or two free areas as a reserve.
        if (sFreeAreaCount <= 1) {
-               _push(sFreeAreas, area);
-               sFreeAreaCount++;
+               _PushFreeArea(area);
                return;
        }
 
        if (area->vmArea == NULL || (flags & CACHE_DONT_LOCK_KERNEL_SPACE) != 
0) {
                // This is either early in the boot process or we aren't 
allowed to
                // delete the area now.
-               _push(sFreeAreas, area);
-               sFreeAreaCount++;
+               _PushFreeArea(area);
                _RequestMaintenance();
                return;
        }
diff --git a/src/system/kernel/slab/MemoryManager.h 
b/src/system/kernel/slab/MemoryManager.h
index 0fe20cb..9af7c96 100644
--- a/src/system/kernel/slab/MemoryManager.h
+++ b/src/system/kernel/slab/MemoryManager.h
@@ -15,6 +15,7 @@
 #include <util/OpenHashTable.h>
 
 #include "slab_debug.h"
+#include "slab_private.h"
 
 
 class AbstractTraceEntryWithStackTrace;
@@ -161,6 +162,9 @@ private:
        static  void                            _PrepareMetaChunk(MetaChunk* 
metaChunk,
                                                                        size_t 
chunkSize);
 
+       static  void                            _PushFreeArea(Area* area);
+       static  Area*                           _PopFreeArea();
+
        static  void                            _AddArea(Area* area);
        static  status_t                        _AllocateArea(uint32 flags, 
Area*& _area);
        static  void                            _FreeArea(Area* area, bool 
areaRemoved,
@@ -235,6 +239,25 @@ MemoryManager::MaintenanceNeeded()
 }
 
 
+/*static*/ inline void
+MemoryManager::_PushFreeArea(Area* area)
+{
+       _push(sFreeAreas, area);
+       sFreeAreaCount++;
+}
+
+
+/*static*/ inline MemoryManager::Area*
+MemoryManager::_PopFreeArea()
+{
+       if (sFreeAreaCount == 0)
+               return NULL;
+
+       sFreeAreaCount--;
+       return _pop(sFreeAreas);
+}
+
+
 /*static*/ inline addr_t
 MemoryManager::_AreaBaseAddressForAddress(addr_t address)
 {

############################################################################

Commit:      43b331da20ab31d8d01ce7407b78e0e51200e9e0
URL:         http://cgit.haiku-os.org/haiku/commit/?id=43b331d
Author:      Scott McCreary <scottmc2@xxxxxxxxx>
Date:        Tue Sep 11 07:09:53 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:46 2012 UTC

Updated several more OptionalPackages

----------------------------------------------------------------------------

diff --git a/build/jam/OptionalLibPackages b/build/jam/OptionalLibPackages
index b02eada..0b32992 100644
--- a/build/jam/OptionalLibPackages
+++ b/build/jam/OptionalLibPackages
@@ -38,14 +38,14 @@ if [ IsOptionalHaikuImagePackageAdded AllegroLibs ] {
                Echo "No optional package AllegroLibs available for 
$(TARGET_ARCH)" ;
        } else if $(HAIKU_GCC_VERSION[1]) >= 4 {
                InstallOptionalHaikuImagePackage
-                       allegro-4.4.1.1-r1a3-x86-gcc4-2011-05-26.zip
-                       : 
$(baseURL)/lib/allegro-4.4.1.1-r1a3-x86-gcc4-2011-05-26.zip ;
+                       allegro-4.4.1.1-r1a4-x86-gcc4-2012-09-09.zip
+                       : 
$(baseURL)/lib/allegro-4.4.1.1-r1a4-x86-gcc4-2012-09-09.zip ;
                InstallOptionalHaikuImagePackage
-                       dumb-0.9.3-r1a3-x86-gcc4-2011-05-26.zip
-                       : 
$(baseURL)/lib/dumb-0.9.3-r1a3-x86-gcc4-2011-05-26.zip ;
+                       dumb-0.9.3-r1a4-x86-gcc4-2012-09-09.zip
+                       : 
$(baseURL)/lib/dumb-0.9.3-r1a4-x86-gcc4-2012-09-09.zip ;
                InstallOptionalHaikuImagePackage
-                       jgmod-0.99-r1a3-x86-gcc4-2011-05-26.zip
-                       : 
$(baseURL)/lib/jgmod-0.99-r1a3-x86-gcc4-2011-05-26.zip ;
+                       jgmod-0.99-r1a4-x86-gcc4-2012-09-09.zip
+                       : 
$(baseURL)/lib/jgmod-0.99-r1a4-x86-gcc4-2012-09-09.zip ;
        } else {
                InstallOptionalHaikuImagePackage
                        allegro-4.4.1.1-r1a3-x86-gcc2-2011-05-19.zip
@@ -67,8 +67,8 @@ if [ IsOptionalHaikuImagePackageAdded box2d ] {
        } else {
                if $(HAIKU_GCC_VERSION[1]) >= 4 || $(isHybridBuild) {
                        InstallOptionalHaikuImagePackage
-                               box2d-2.1.2-r1a3-r1a3-x86-gcc4-2011-05-26.zip
-                               : 
$(baseURL)/lib/box2d-2.1.2-r1a3-x86-gcc4-2011-05-26.zip
+                               box2d-2.1.2-r1a4-x86-gcc4-2012-09-09.zip
+                               : 
$(baseURL)/lib/box2d-2.1.2-r1a4-x86-gcc4-2012-09-09.zip
                                : : true ;
                } else {
                        Echo "No optional package box2d available for 
$(TARGET_ARCH)-gcc2" ;
@@ -209,8 +209,8 @@ if [ IsOptionalHaikuImagePackageAdded physfs ] {
                Echo "No optional package physfs available for $(TARGET_ARCH)" ;
        } else if $(HAIKU_GCC_VERSION[1]) >= 4 {
                InstallOptionalHaikuImagePackage
-                       physfs-2.0.1-r1a3-x86-gcc4-2011-05-26.zip
-                       : 
$(baseURL)/lib/physfs-2.0.1-r1a3-x86-gcc4-2011-05-26.zip
+                       physfs-2.0.1-r1a4-x86-gcc4-2012-09-09.zip
+                       : 
$(baseURL)/lib/physfs-2.0.1-r1a4-x86-gcc4-2012-09-09.zip
                        : : true ;
        } else {
                InstallOptionalHaikuImagePackage
diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index 038e993..87d4761 100644
--- a/build/jam/OptionalPackages
+++ b/build/jam/OptionalPackages
@@ -714,8 +714,8 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ]
                        m4-1.4.16-r1a4-x86-gcc2-2012-08-26.zip
                        : $(baseURL)/m4-1.4.16-r1a4-x86-gcc2-2012-08-26.zip ;
                InstallOptionalHaikuImagePackage
-                       flex-2.5.35-r1a4-x86-gcc2-2012-08-26.zip
-                       : $(baseURL)/flex-2.5.35-r1a4-x86-gcc2-2012-08-26.zip ;
+                       flex-2.5.35-r1a4-x86-gcc2-2012-09-10.zip
+                       : $(baseURL)/flex-2.5.35-r1a4-x86-gcc2-2012-09-10.zip ;
                InstallOptionalHaikuImagePackage
                        jam-2.5-r1a4-x86-gcc2-2012-08-27.zip
                        : $(baseURL)/jam-2.5-r1a4-x86-gcc2-2012-08-27.zip ;
@@ -1142,12 +1142,12 @@ if [ IsOptionalHaikuImagePackageAdded KeymapSwitcher ] {
        } else {
                if $(HAIKU_GCC_VERSION[1]) >= 4 {
                        InstallOptionalHaikuImagePackage
-                               KeymapSwitcher-1.2.7-x86-gcc4-2012-05-19.zip
-                               : 
$(baseURL)/KeymapSwitcher-1.2.7-x86-gcc4-2012-05-19.zip ;
+                               
KeymapSwitcher-1.2.7-r1a4-x86-gcc4-2012-09-09.zip
+                               : 
$(baseURL)/KeymapSwitcher-1.2.7-r1a4-x86-gcc4-2012-09-09.zip ;
                } else {
                        InstallOptionalHaikuImagePackage
-                               KeymapSwitcher-1.2.7-x86-gcc2-2012-05-19.zip
-                               : 
$(baseURL)/KeymapSwitcher-1.2.7-x86-gcc2-2012-05-19.zip ;
+                               
KeymapSwitcher-1.2.7-r1a4-x86-gcc2-2012-08-31.zip
+                               : 
$(baseURL)/KeymapSwitcher-1.2.7-r1a4-x86-gcc2-2012-08-31.zip ;
                }
                AddSymlinkToHaikuImage home config settings deskbar Preferences
                        : /boot/common/bin/KeymapSwitcher ;
@@ -1274,8 +1274,12 @@ if [ IsOptionalHaikuImagePackageAdded LibXSLT ] {
 if [ IsOptionalHaikuImagePackageAdded Links ] {
        if $(TARGET_ARCH) != x86 {
                Echo "No optional package Links available for $(TARGET_ARCH)" ;
-       } else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
-               Echo "No optional package Links available for gcc4" ;
+       } else if $(HAIKU_GCC_VERSION[1]) >= 4 {
+               InstallOptionalHaikuImagePackage
+                       links-2.3pre2-r1a4-x86-gcc4-2012-09-09.zip
+                       : $(baseURL)/links-2.3pre2-r1a4-x86-gcc4-2012-09-09.zip 
;
+               AddSymlinkToHaikuImage home config settings deskbar Applications
+                       : /boot/home/config/bin/links ;
        } else {
                InstallOptionalHaikuImagePackage
                        links-2.3pre2-r1a4-x86-gcc2-2012-08-30.zip
@@ -1649,8 +1653,8 @@ if [ IsOptionalHaikuImagePackageAdded Rsync ] {
        } else {
                if $(HAIKU_GCC_VERSION[1]) >= 4 {
                        InstallOptionalHaikuImagePackage
-                               rsync-3.0.7-r1a4-x86-gcc4-2012-08-31.zip
-                               : 
$(baseURL)/rsync-3.0.7-r1a4-x86-gcc4-2012-08-31.zip
+                               rsync-3.0.7-r1a4-x86-gcc4-2012-09-09.zip
+                               : 
$(baseURL)/rsync-3.0.7-r1a4-x86-gcc4-2012-09-09.zip
                                : : true ;
                } else {
                        InstallOptionalHaikuImagePackage
@@ -1668,12 +1672,12 @@ if [ IsOptionalHaikuImagePackageAdded Ruby ] {
                Echo "No optional package Ruby available for $(TARGET_ARCH)" ;
        } else if $(HAIKU_GCC_VERSION[1]) >= 4 {
                InstallOptionalHaikuImagePackage
-                       ruby-1.9.1-r1a4-x86-gcc4-2012-08-31.zip
-                       : $(baseURL)/ruby-1.9.1-r1a4-x86-gcc4-2012-08-31.zip ;
+                       ruby-1.9.1-r1a4-x86-gcc4-2012-09-10.zip
+                       : $(baseURL)/ruby-1.9.1-r1a4-x86-gcc4-2012-09-10.zip ;
        } else {
                InstallOptionalHaikuImagePackage
-                       ruby-1.9.1-r1a4-x86-gcc2-2012-08-29.zip
-                       : $(baseURL)/ruby-1.9.1-r1a4-x86-gcc2-2012-08-29.zip ;
+                       ruby-1.9.1-r1a4-x86-gcc2-2012-09-10.zip
+                       : $(baseURL)/ruby-1.9.1-r1a4-x86-gcc2-2012-09-10.zip ;
        }
 }
 

############################################################################

Commit:      b87ff1aceee125fb4058ca0efc9d8e8fc512e6a8
URL:         http://cgit.haiku-os.org/haiku/commit/?id=b87ff1a
Author:      Scott McCreary <scottmc2@xxxxxxxxx>
Date:        Wed Sep 12 06:37:24 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:46 2012 UTC

Rebuilf beam and transmission gcc4 packages

----------------------------------------------------------------------------

diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index 87d4761..a21e54b 100644
--- a/build/jam/OptionalPackages
+++ b/build/jam/OptionalPackages
@@ -212,8 +212,8 @@ if [ IsOptionalHaikuImagePackageAdded Beam ] {
        } else {
                if $(HAIKU_GCC_VERSION[1]) >= 4 {
                        InstallOptionalHaikuImagePackage
-                               beam-1.2alpha-x86-gcc4-2012-08-11.zip
-                               : 
$(baseURL)/beam-1.2alpha-x86-gcc4-2012-08-11.zip ;
+                               beam-1.2alpha-r1a4-x86-gcc4-2012-09-12.zip
+                               : 
$(baseURL)/beam-1.2alpha-r1a4-x86-gcc4-2012-09-12.zip ;
                } else {
                        InstallOptionalHaikuImagePackage
                                beam-1.2alpha-r1a4-x86-gcc2-2012-08-29.zip
@@ -1793,8 +1793,8 @@ if [ IsOptionalHaikuImagePackageAdded Transmission ] {
        } else {
                if $(HAIKU_GCC_VERSION[1]) >= 4 {
                        InstallOptionalHaikuImagePackage
-                               transmission-2.21-r1a4-x86-gcc4-2012-09-03.zip
-                               : 
$(baseURL)/transmission-2.21-r1a4-x86-gcc4-2012-09-03.zip
+                               transmission-2.21-r1a4-x86-gcc4-2012-09-12.zip
+                               : 
$(baseURL)/transmission-2.21-r1a4-x86-gcc4-2012-09-12.zip
                                : : true ;
                } else {
                        InstallOptionalHaikuImagePackage

############################################################################

Commit:      8ce8ccf96f15c87164e34877dbaf963b1cbd86d0
URL:         http://cgit.haiku-os.org/haiku/commit/?id=8ce8ccf
Author:      Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date:        Wed Sep 12 18:20:43 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:46 2012 UTC

Ticket:      https://dev.haiku-os.org/ticket/8977

Run the transaction flusher in another thread.

* This fixes bug #8977.

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.cpp 
b/src/add-ons/kernel/file_systems/bfs/Journal.cpp
index f1a1f74..473ad28 100644
--- a/src/add-ons/kernel/file_systems/bfs/Journal.cpp
+++ b/src/add-ons/kernel/file_systems/bfs/Journal.cpp
@@ -684,10 +684,20 @@ Journal::_TransactionWritten(int32 transactionID, int32 
event, void* _logEntry)
 /*static*/ void
 Journal::_TransactionIdle(int32 transactionID, int32 event, void* _journal)
 {
-       // The current transaction seems to be idle - flush it
+       // The current transaction seems to be idle - flush it. We can't do this
+       // in this thread, as flushing the log can produce new transaction 
events.
+       thread_id id = spawn_kernel_thread(&Journal::_FlushLog, "bfs log 
flusher",
+               B_NORMAL_PRIORITY, _journal);
+       if (id > 0)
+               resume_thread(id);
+}
+
 
+/*static*/ status_t
+Journal::_FlushLog(void* _journal)
+{
        Journal* journal = (Journal*)_journal;
-       journal->_FlushLog(false, false);
+       return journal->_FlushLog(false, false);
 }
 
 
diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.h 
b/src/add-ons/kernel/file_systems/bfs/Journal.h
index c128a96..6e22ad0 100644
--- a/src/add-ons/kernel/file_systems/bfs/Journal.h
+++ b/src/add-ons/kernel/file_systems/bfs/Journal.h
@@ -60,7 +60,9 @@ private:
                                                                int32 event, 
void* _logEntry);
        static  void                    _TransactionIdle(int32 transactionID, 
int32 event,
                                                                void* _journal);
+       static  status_t                _FlushLog(void* _journal);
 
+private:
                        Volume*                 fVolume;
                        recursive_lock  fLock;
                        Transaction*    fOwner;

############################################################################

Commit:      797a822aeeb436dba677052dd2376daed0eb7d1b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=797a822
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Wed Sep 12 19:47:59 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:46 2012 UTC

DevelopmentMin optional package: add 3rdparty headers

* Add freetype, libpng and jpeg headers

----------------------------------------------------------------------------

diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index a21e54b..bb103e8 100644
--- a/build/jam/OptionalPackages
+++ b/build/jam/OptionalPackages
@@ -847,6 +847,13 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && 
$(TARGET_ARCH) = x86 {
        AddHeaderDirectoryToHaikuImage libs tiff : 3rdparty ;
        AddHeaderDirectoryToHaikuImage libs zlib : 3rdparty ;
 
+       CopyDirectoryToHaikuImage develop headers : 
+               [ FDirName $(HAIKU_FREETYPE_DIR) develop headers 3rdparty ] ;
+       CopyDirectoryToHaikuImage develop headers : $(HAIKU_JPEG_HEADERS)
+               : 3rdparty ;
+       CopyDirectoryToHaikuImage develop headers : $(HAIKU_LIBPNG_HEADERS)
+               : 3rdparty ;
+
        # cpp headers
        if $(HAIKU_GCC_VERSION[1]) = 2 {
                # GCC 2 only -- for GCC 4 they come with the DevelopmentBase 
package

############################################################################

Commit:      df101c783592176d1e83a31ff718e2a8b40b81ce
URL:         http://cgit.haiku-os.org/haiku/commit/?id=df101c7
Author:      Scott McCreary <scottmc2@xxxxxxxxx>
Date:        Thu Sep 13 05:47:08 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:47 2012 UTC

Rebuilt some more packages mostly to fix directory issues.

----------------------------------------------------------------------------

diff --git a/build/jam/OptionalLibPackages b/build/jam/OptionalLibPackages
index 0b32992..a72774a 100644
--- a/build/jam/OptionalLibPackages
+++ b/build/jam/OptionalLibPackages
@@ -48,14 +48,14 @@ if [ IsOptionalHaikuImagePackageAdded AllegroLibs ] {
                        : 
$(baseURL)/lib/jgmod-0.99-r1a4-x86-gcc4-2012-09-09.zip ;
        } else {
                InstallOptionalHaikuImagePackage
-                       allegro-4.4.1.1-r1a3-x86-gcc2-2011-05-19.zip
-                       : 
$(baseURL)/lib/allegro-4.4.1.1-r1a3-x86-gcc2-2011-05-19.zip ;
+                       allegro-4.4.1.1-r1a4-x86-gcc2-2012-08-30.zip
+                       : 
$(baseURL)/lib/allegro-4.4.1.1-r1a4-x86-gcc2-2012-08-30.zip ;
                InstallOptionalHaikuImagePackage
-                       dumb-0.9.3-x86-r1a3-x86-gcc2-2011-05-19.zip
-                       : 
$(baseURL)/lib/dumb-0.9.3-r1a3-x86-gcc2-2011-05-19.zip ;
+                       dumb-0.9.3-r1a4-x86-gcc2-2012-08-30.zip
+                       : 
$(baseURL)/lib/dumb-0.9.3-r1a4-x86-gcc2-2012-08-30.zip ;
                InstallOptionalHaikuImagePackage
-                       jgmod-0.99-x86-gcc2-2011-08-02.zip
-                       : $(baseURL)/lib/jgmod-0.99-x86-gcc2-2011-08-02.zip ;
+                       jgmod-0.99-r1a4-x86-gcc2-2012-08-30.zip
+                       : 
$(baseURL)/lib/jgmod-0.99-r1a4-x86-gcc2-2012-08-30.zip ;
        }
 }
 
@@ -214,8 +214,8 @@ if [ IsOptionalHaikuImagePackageAdded physfs ] {
                        : : true ;
        } else {
                InstallOptionalHaikuImagePackage
-                       physfs-2.0.1-r1a3-x86-gcc2-2011-05-19.zip
-                       : 
$(baseURL)/lib/physfs-2.0.1-r1a3-x86-gcc2-2011-05-19.zip
+                       physfs-2.0.1-r1a4-x86-gcc2-2012-08-29.zip
+                       : 
$(baseURL)/lib/physfs-2.0.1-r1a4-x86-gcc2-2012-08-29.zip
                        : : true ;
        }
 }
diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index bb103e8..1b37140 100644
--- a/build/jam/OptionalPackages
+++ b/build/jam/OptionalPackages
@@ -906,8 +906,8 @@ if [ IsOptionalHaikuImagePackageAdded Doxygen ] {
        } else {
                if $(HAIKU_GCC_VERSION[1]) >= 4 {
                        InstallOptionalHaikuImagePackage
-                               doxygen-1.6.3-x86-gcc4-2010-05-17.zip
-                               : 
$(baseURL)/doxygen-1.6.3-x86-gcc4-2010-05-17.zip
+                               doxygen-1.6.3-r1a4-x86-gcc4-2012-09-04.zip
+                               : 
$(baseURL)/doxygen-1.6.3-r1a4-x86-gcc4-2012-09-04.zip
                                : : true ;
                } else {
                        InstallOptionalHaikuImagePackage
@@ -962,8 +962,8 @@ if [ IsOptionalHaikuImagePackageAdded friss ] {
        } else {
                if $(HAIKU_GCC_VERSION[1]) >= 4 {
                        InstallOptionalHaikuImagePackage
-                               friss-24-r1a3-x86-gcc4-2011-05-31.zip
-                               : 
$(baseURL)/friss-24-r1a3-x86-gcc4-2011-05-31.zip ;
+                               friss-29-r1a4-x86-gcc4-2012-09-09.zip
+                               : 
$(baseURL)/friss-29-r1a4-x86-gcc4-2012-09-09.zip ;
                } else {
                        InstallOptionalHaikuImagePackage
                                friss-29-r1a4-x86-gcc2-2012-08-28.zip
@@ -1665,8 +1665,8 @@ if [ IsOptionalHaikuImagePackageAdded Rsync ] {
                                : : true ;
                } else {
                        InstallOptionalHaikuImagePackage
-                               rsync-3.0.7-r1a4-x86-gcc2-2012-08-29.zip
-                               : 
$(baseURL)/rsync-3.0.7-r1a4-x86-gcc2-2012-08-29.zip
+                               rsync-3.0.7-r1a4-x86-gcc2-2012-09-12.zip
+                               : 
$(baseURL)/rsync-3.0.7-r1a4-x86-gcc2-2012-09-12.zip
                                : : true ;
                }
        }
@@ -1805,8 +1805,8 @@ if [ IsOptionalHaikuImagePackageAdded Transmission ] {
                                : : true ;
                } else {
                        InstallOptionalHaikuImagePackage
-                               transmission-2.21-r1a4-x86-gcc2-2012-08-30.zip
-                               : 
$(baseURL)/transmission-2.21-r1a4-x86-gcc2-2012-08-30.zip
+                               transmission-2.21-r1a4-x86-gcc2-2012-09-05.zip
+                               : 
$(baseURL)/transmission-2.21-r1a4-x86-gcc2-2012-09-05.zip
                                : : true ;
                }
        }

############################################################################

Commit:      8777466f5618a110231e955042a4356754f325da
URL:         http://cgit.haiku-os.org/haiku/commit/?id=8777466
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Thu Sep 13 16:10:42 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:47 2012 UTC

VM Preflet: Use AutoDeleter on the settings

* Prevents a minor memory leak
* Thanks for catching this Axel!

----------------------------------------------------------------------------

diff --git a/src/preferences/virtualmemory/Settings.cpp 
b/src/preferences/virtualmemory/Settings.cpp
index 08f6102..9b9b21f 100644
--- a/src/preferences/virtualmemory/Settings.cpp
+++ b/src/preferences/virtualmemory/Settings.cpp
@@ -17,6 +17,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <AutoDeleter.h>
 #include <File.h>
 #include <FindDirectory.h>
 #include <Path.h>
@@ -138,6 +139,8 @@ Settings::ReadSwapSettings()
        void* settings = load_driver_settings(kVirtualMemorySettings);
        if (settings == NULL)
                return kErrorSettingsNotFound;
+       CObjectDeleter<void, status_t> settingDeleter(settings,
+               &unload_driver_settings);
 
        const char* enabled = get_driver_parameter(settings, "vm", NULL, NULL);
        const char* automatic = get_driver_parameter(settings, "swap_auto",

############################################################################

Commit:      54ad750e2f93dd5c838caac26c3da430c29a77f7
URL:         http://cgit.haiku-os.org/haiku/commit/?id=54ad750
Author:      Scott McCreary <scottmc2@xxxxxxxxx>
Date:        Fri Sep 14 03:09:01 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:47 2012 UTC

Add OptionalPackage Nanumfont, a Korean monospace font

----------------------------------------------------------------------------

diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index 1b37140..e25556d 100644
--- a/build/jam/OptionalPackages
+++ b/build/jam/OptionalPackages
@@ -68,6 +68,7 @@ if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
 #      Man                                             - standard commands to 
read man pages
 #      Mercurial                               - the distributed version 
control system
 #      Nano                                    - the command line text editor
+#      Nanumfont                               - Korean monospace font
 #      Neon                                    - support libraries used for 
example by SVN
 #      NetFS                                   - the native networked file 
system components
 #      NetSurf                                 - the web browser
@@ -1377,6 +1378,14 @@ if [ IsOptionalHaikuImagePackageAdded Nano ] {
 }
 
 
+# Nanumfont
+if [ IsOptionalHaikuImagePackageAdded Nanumfont ] {
+       InstallOptionalHaikuImagePackage
+               nanumfont-2.0-r1a4-x86-gcc2-2012-09-12.zip
+               : $(baseURL)/nanumfont-2.0-r1a4-x86-gcc2-2012-09-12.zip ;
+}
+
+
 # Neon
 if [ IsOptionalHaikuImagePackageAdded Neon ] {
        if $(TARGET_ARCH) != x86 {

############################################################################

Commit:      fef180261fdd623850f235909dd9de8a69472fee
URL:         http://cgit.haiku-os.org/haiku/commit/?id=fef1802
Author:      Scott McCreary <scottmc2@xxxxxxxxx>
Date:        Fri Sep 14 03:25:40 2012 UTC
Committer:   Ryan Leavengood <leavengood@xxxxxxxxx>
Commit-Date: Sat Sep 15 04:34:47 2012 UTC

Add OptionalPackage Droid, font from Google's Android project

----------------------------------------------------------------------------

diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index e25556d..f0067ec 100644
--- a/build/jam/OptionalPackages
+++ b/build/jam/OptionalPackages
@@ -45,6 +45,7 @@ if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
 #      DevelopmentMin                  - development headers, libs, tools, 
from sources only
 #      DevelopmentPowerPC                      - Cross compiling environment 
for PowerPC
 #      Doxygen                                 - Generate documentation from 
source code
+#      Droid                                   - Font family from Google's 
Android project
 #      Expat                                   - XML parsing libraries
 #      Fastdep                                 - fast dependency generator for 
C/C++ files
 #      friss                                   - RSS/ATOM/... feeds reader
@@ -920,6 +921,14 @@ if [ IsOptionalHaikuImagePackageAdded Doxygen ] {
 }
 
 
+# Droid
+if [ IsOptionalHaikuImagePackageAdded Droid ] {
+       InstallOptionalHaikuImagePackage
+               droid-113-r1a4-x86-gcc2-2012-08-27.zip
+               : $(baseURL)/droid-113-r1a4-x86-gcc2-2012-08-27.zip ;
+}
+
+
 # Expat
 if [ IsOptionalHaikuImagePackageAdded Expat ] {
        if $(TARGET_ARCH) != x86 {

############################################################################

Revision:    hrevr1alpha4-44600
Commit:      b3bfaea495249db96e7c8192870f25c9e7acb8b8
URL:         http://cgit.haiku-os.org/haiku/commit/?id=b3bfaea
Author:      Ryan Leavengood <leavengood@xxxxxxxxx>
Date:        Sat Sep 15 04:19:42 2012 UTC

Don't call unload_driver_settings twice. Thanks Hamish.

----------------------------------------------------------------------------

diff --git a/src/preferences/virtualmemory/Settings.cpp 
b/src/preferences/virtualmemory/Settings.cpp
index 9b9b21f..c326e36 100644
--- a/src/preferences/virtualmemory/Settings.cpp
+++ b/src/preferences/virtualmemory/Settings.cpp
@@ -166,7 +166,6 @@ Settings::ReadSwapSettings()
        SetSwapAutomatic(get_driver_boolean_parameter(settings,
                "swap_auto", true, false));
        SetSwapSize(atoll(size));
-       unload_driver_settings(settings);
 
        int32 bestScore = -1;
        dev_t bestVol = -1;


Other related posts: