hrev52935 adds 2 changesets to branch 'master'
old head: 984ec35f2a8e85f0ba00943eb5755fa45d2ecfc3
new head: 7930fb5b5ee8e6d47d854a75de38749e8669b31c
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=7930fb5b5ee8+%5E984ec35f2a8e
----------------------------------------------------------------------------
fb1dd50ee771: kernel/fs: Make fs_mount::lock a mutex instead of a
recursive_lock.
Solves a TODO.
7930fb5b5ee8: build: Print unavailable build features in one rather than
multiple lines.
Reduces Jam noise and significantly improves readability.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
2 files changed, 49 insertions(+), 45 deletions(-)
build/jam/BuildFeatures | 75 +++++++++++++++++++++-------------------
src/system/kernel/fs/vfs.cpp | 19 +++++-----
############################################################################
Commit: fb1dd50ee771e236961b62318e592b4cd747a1d2
URL: https://git.haiku-os.org/haiku/commit/?id=fb1dd50ee771
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Feb 25 21:11:08 2019 UTC
kernel/fs: Make fs_mount::lock a mutex instead of a recursive_lock.
Solves a TODO.
----------------------------------------------------------------------------
diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp
index 405b5832fe..e9c7e95cc3 100644
--- a/src/system/kernel/fs/vfs.cpp
+++ b/src/system/kernel/fs/vfs.cpp
@@ -132,12 +132,12 @@ struct fs_mount {
volume(NULL),
device_name(NULL)
{
- recursive_lock_init(&rlock, "mount rlock");
+ mutex_init(&lock, "mount lock");
}
~fs_mount()
{
- recursive_lock_destroy(&rlock);
+ mutex_destroy(&lock);
free(device_name);
while (volume) {
@@ -156,8 +156,7 @@ struct fs_mount {
dev_t id;
fs_volume* volume;
char* device_name;
- recursive_lock rlock; // guards the vnodes list
- // TODO: Make this a mutex! It is never used recursively.
+ mutex lock; // guards the vnodes list
struct vnode* root_vnode;
struct vnode* covers_vnode; // immutable
KPartition* partition;
@@ -865,7 +864,7 @@ get_file_system_name_for_layer(const char* fsNames, int32
layer)
static void
add_vnode_to_mount_list(struct vnode* vnode, struct fs_mount* mount)
{
- RecursiveLocker _(mount->rlock);
+ MutexLocker _(mount->lock);
mount->vnodes.Add(vnode);
}
@@ -873,7 +872,7 @@ add_vnode_to_mount_list(struct vnode* vnode, struct
fs_mount* mount)
static void
remove_vnode_from_mount_list(struct vnode* vnode, struct fs_mount* mount)
{
- RecursiveLocker _(mount->rlock);
+ MutexLocker _(mount->lock);
mount->vnodes.Remove(vnode);
}
@@ -3017,7 +3016,7 @@ _dump_mount(struct fs_mount* mount)
kprintf(" root_vnode: %p\n", mount->root_vnode);
kprintf(" covers: %p\n", mount->root_vnode->covers);
kprintf(" partition: %p\n", mount->partition);
- kprintf(" lock: %p\n", &mount->rlock);
+ kprintf(" lock: %p\n", &mount->lock);
kprintf(" flags: %s%s\n", mount->unmounting ? " unmounting" : "",
mount->owns_file_device ? " owns_file_device" : "");
@@ -7903,10 +7902,10 @@ fs_sync(dev_t device)
// a lot of concurrency. Using a read lock would be
possible, but
// also more involved, since we had to lock the
individual nodes
// and take care of the locking order, which we might
not want to
- // do while holding fs_mount::rlock.
+ // do while holding fs_mount::lock.
// synchronize access to vnode list
- recursive_lock_lock(&mount->rlock);
+ mutex_lock(&mount->lock);
struct vnode* vnode;
if (!marker.IsRemoved()) {
@@ -7929,7 +7928,7 @@ fs_sync(dev_t device)
marker.SetRemoved(false);
}
- recursive_lock_unlock(&mount->rlock);
+ mutex_unlock(&mount->lock);
if (vnode == NULL)
break;
############################################################################
Revision: hrev52935
Commit: 7930fb5b5ee8e6d47d854a75de38749e8669b31c
URL: https://git.haiku-os.org/haiku/commit/?id=7930fb5b5ee8
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Feb 25 21:11:39 2019 UTC
build: Print unavailable build features in one rather than multiple lines.
Reduces Jam noise and significantly improves readability.
----------------------------------------------------------------------------
diff --git a/build/jam/BuildFeatures b/build/jam/BuildFeatures
index 11111f7388..6f7b668501 100644
--- a/build/jam/BuildFeatures
+++ b/build/jam/BuildFeatures
@@ -9,6 +9,8 @@ local libDir = lib$(secondaryArchSubDir) ;
local developLibDir = develop/lib$(secondaryArchSubDir) ;
local developHeadersDir = develop/headers$(secondaryArchSubDir) ;
+local unavailableBuildFeatures ;
+
# SSL
@@ -32,7 +34,7 @@ if $(HAIKU_BUILD_FEATURE_SSL) {
EnableBuildFeatures openssl ;
} else {
- Echo "SSL build feature not available for
$(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += openssl ;
}
}
@@ -50,7 +52,7 @@ if $(TARGET_PACKAGING_ARCH) != x86_gcc2 {
EnableBuildFeatures gcc_syslibs ;
} else {
- Echo "gcc_syslibs not available for $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += gcc_syslibs ;
}
}
@@ -86,7 +88,7 @@ if [ IsPackageAvailable gcc_syslibs_devel ] {
EnableBuildFeatures gcc_syslibs_devel ;
} else {
- Echo "gcc_syslibs_devel not available for $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += gcc_syslibs_devel ;
}
@@ -111,7 +113,7 @@ if [ IsPackageAvailable icu_devel ] {
EnableBuildFeatures icu ;
} else {
- Echo "ICU not available for $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += icu ;
}
@@ -179,7 +181,7 @@ if [ IsPackageAvailable giflib_devel ] {
EnableBuildFeatures giflib ;
} else {
- Echo "Giflib support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += giflib ;
}
@@ -196,7 +198,7 @@ if [ IsPackageAvailable glu_devel ] {
EnableBuildFeatures glu ;
} else {
- Echo "GLU not yet available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += glu ;
}
@@ -213,7 +215,7 @@ if [ IsPackageAvailable mesa_devel ] {
EnableBuildFeatures mesa ;
} else {
- Echo "GL not yet available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += mesa ;
}
@@ -234,7 +236,7 @@ if [ IsPackageAvailable ffmpeg_devel ] {
EnableBuildFeatures ffmpeg ;
} else {
- Echo "FFMpeg support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += ffmpeg ;
}
@@ -248,7 +250,7 @@ if [ IsPackageAvailable fluidlite_devel ] && [
IsPackageAvailable libvorbis_deve
EnableBuildFeatures fluidlite ;
} else {
- Echo "Fluidlite support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += fluidlite ;
}
@@ -265,7 +267,7 @@ if [ IsPackageAvailable libvorbis_devel ] {
EnableBuildFeatures libvorbis ;
} else {
- Echo "Libvorbis support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += libvorbis ;
}
@@ -282,7 +284,7 @@ if [ IsPackageAvailable freetype_devel ] {
EnableBuildFeatures freetype ;
} else {
- Echo "Freetype support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += freetype ;
}
# fontconfig
@@ -298,7 +300,7 @@ if [ IsPackageAvailable fontconfig_devel ] {
EnableBuildFeatures fontconfig ;
} else {
- Echo "fontconfig support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += fontconfig ;
}
# Gutenprint
@@ -314,7 +316,7 @@ if [ IsPackageAvailable gutenprint_devel ] {
EnableBuildFeatures gutenprint ;
} else {
- Echo "Gutenprint support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += gutenprint ;
}
@@ -382,7 +384,7 @@ if [ IsPackageAvailable haikuwebkit_devel ] {
EnableBuildFeatures webkit ;
} else {
- Echo "WebKit build feature not available for $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += webkit ;
}
@@ -399,7 +401,7 @@ if [ IsPackageAvailable libpng16_devel ] {
EnableBuildFeatures libpng ;
} else {
- Echo "libpng support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += libpng ;
}
@@ -416,7 +418,7 @@ if [ IsPackageAvailable libicns_devel ] {
EnableBuildFeatures libicns ;
} else {
- Echo "libicns support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += libicns ;
}
@@ -433,7 +435,7 @@ if [ IsPackageAvailable jasper_devel ] {
EnableBuildFeatures jasper ;
} else {
- Echo "Jasper support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += jasper ;
}
@@ -450,7 +452,7 @@ if [ IsPackageAvailable jpeg_devel ] {
EnableBuildFeatures jpeg ;
} else {
- Echo "jpeg support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += jpeg ;
}
@@ -472,7 +474,7 @@ if [ IsPackageAvailable zlib_devel ] {
EnableBuildFeatures zlib ;
} else {
- Echo "zlib support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += zlib ;
}
@@ -489,7 +491,7 @@ if [ IsPackageAvailable libedit_devel ] {
EnableBuildFeatures libedit ;
} else {
- Echo "libedit support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += libedit ;
}
@@ -513,7 +515,7 @@ if [ IsPackageAvailable libsolv_devel ] {
EnableBuildFeatures libsolv ;
} else {
- Echo "libsolv package not available for $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += libsolv ;
}
@@ -527,7 +529,7 @@ if [ IsPackageAvailable qrencode_kdl_devel ] {
EnableBuildFeatures libqrencode_kdl ;
} else {
- Echo "qrencode support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += qrencode_kdl ;
}
@@ -544,7 +546,7 @@ if [ IsPackageAvailable tiff4_devel ] {
EnableBuildFeatures tiff ;
} else {
- Echo "Tiff support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += tiff ;
}
@@ -564,7 +566,7 @@ if [ IsPackageAvailable openexr_devel ]
EnableBuildFeatures openexr ;
} else {
- Echo "OpenEXR support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += openexr ;
}
@@ -586,7 +588,7 @@ if [ IsPackageAvailable ilmbase_devel ] {
EnableBuildFeatures ilmbase ;
} else {
- Echo "IlmBase support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += ilmbase ;
}
@@ -603,7 +605,7 @@ if [ IsPackageAvailable libdvdread_devel ] {
EnableBuildFeatures libdvdread ;
} else {
- Echo "libdvdread support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += libdvdread ;
}
@@ -620,7 +622,7 @@ if [ IsPackageAvailable libdvdnav_devel ] {
EnableBuildFeatures libdvdnav ;
} else {
- Echo "libdvdnav support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += libdvdnav ;
}
@@ -648,7 +650,7 @@ if [ IsPackageAvailable libwebp_devel ] {
EnableBuildFeatures libwebp ;
} else {
- Echo "Libwebp support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += libwebp ;
}
@@ -670,7 +672,7 @@ if [ IsPackageAvailable live555_devel ] {
;
EnableBuildFeatures live555 ;
} else {
- Echo "live555 not available for $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += live555 ;
}
@@ -687,7 +689,7 @@ if [ IsPackageAvailable ncurses6_devel ] {
EnableBuildFeatures ncurses ;
} else {
- Echo "ncurses support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += ncurses6 ;
}
@@ -704,7 +706,7 @@ if [ IsPackageAvailable expat_devel ] {
EnableBuildFeatures expat ;
} else {
- Echo "expat support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += expat ;
}
@@ -720,7 +722,7 @@ if [ IsPackageAvailable gnu_efi_kernel ] {
EnableBuildFeatures gnuefi ;
} else {
- Echo "gnu_efi_kernel support not available on $(TARGET_PACKAGING_ARCH)"
;
+ unavailableBuildFeatures += gnu_efi_kernel ;
}
@@ -742,9 +744,12 @@ if [ IsPackageAvailable zstd_devel ] {
EnableBuildFeatures zstd ;
} else {
- Echo "zstd support not available on $(TARGET_PACKAGING_ARCH)" ;
+ unavailableBuildFeatures += zstd ;
}
-# ATA Drivers + Bus
-EnableBuildFeatures ata ;
+# Print a diagnostic message with build features not presently available.
+if $(unavailableBuildFeatures) {
+ Echo "build-feature packages unavailable on $(TARGET_PACKAGING_ARCH):"
+ "$(unavailableBuildFeatures)" ;
+}