[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 31/43: ext2fs: Improve inlining.
From: |
Samuel Thibault |
Subject: |
[hurd] 31/43: ext2fs: Improve inlining. |
Date: |
Mon, 11 Sep 2017 07:10:11 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 4076a4d3bd380a287fcc0bc9e3d1d573b29714cb
Author: Justus Winter <address@hidden>
Date: Sun Aug 20 13:46:32 2017 +0200
ext2fs: Improve inlining.
* ext2fs/ext2fs.h: Add missing declarations needed when inlining is
disabled.
---
ext2fs/ext2fs.h | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index 08cb510..83a6c90 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -119,9 +119,13 @@ void pokel_inherit (struct pokel *pokel, struct pokel
*from);
#include <stdint.h>
+/* Forward declarations for the following functions that are usually
+ inlined. In case inlining is disabled, or inlining is not
+ applicable, or a reference is taken to one of these functions, an
+ implementation is provided in 'xinl.c'. */
extern int test_bit (unsigned num, unsigned char *bitmap);
-
extern int set_bit (unsigned num, unsigned char *bitmap);
+extern int clear_bit (unsigned num, unsigned char *bitmap);
#if defined(__USE_EXTERN_INLINES) || defined(EXT2FS_DEFINE_EI)
/* Returns TRUE if bit NUM is set in BITMAP. */
@@ -354,6 +358,15 @@ unsigned long next_generation;
/* pointer to in-memory block -> index in disk_cache_info */
#define bptr_index(ptr) (((char *)ptr - (char *)disk_cache) >> log2_block_size)
+/* Forward declarations for the following functions that are usually
+ inlined. In case inlining is disabled, or inlining is not
+ applicable, or a reference is taken to one of these functions, an
+ implementation is provided in 'xinl.c'. */
+extern char *boffs_ptr (off_t offset);
+extern off_t bptr_offs (void *ptr);
+
+#if defined(__USE_EXTERN_INLINES) || defined(EXT2FS_DEFINE_EI)
+
/* byte offset on disk --> pointer to in-memory block */
EXT2FS_EI char *
boffs_ptr (off_t offset)
@@ -385,6 +398,8 @@ bptr_offs (void *ptr)
return offset;
}
+#endif /* Use extern inlines. */
+
/* block num --> pointer to in-memory block */
#define bptr(block) boffs_ptr(boffs(block))
/* pointer to in-memory block --> block num */
@@ -398,7 +413,12 @@ struct ext2_group_desc *group_desc_image;
#define inode_group_num(inum) (((inum) - 1) / sblock->s_inodes_per_group)
-extern struct ext2_inode *dino (ino_t inum);
+/* Forward declarations for the following functions that are usually
+ inlined. In case inlining is disabled, or inlining is not
+ applicable, or a reference is taken to one of these functions, an
+ implementation is provided in 'xinl.c'. */
+extern struct ext2_inode * dino_ref (ino_t inum);
+extern void _dino_deref (struct ext2_inode *inode);
#if defined(__USE_EXTERN_INLINES) || defined(EXT2FS_DEFINE_EI)
/* Convert an inode number to the dinode on disk. */
@@ -447,6 +467,10 @@ struct pokel global_pokel;
unsigned char *modified_global_blocks;
extern pthread_spinlock_t modified_global_blocks_lock;
+/* Forward declarations for the following functions that are usually
+ inlined. In case inlining is disabled, or inlining is not
+ applicable, or a reference is taken to one of these functions, an
+ implementation is provided in 'xinl.c'. */
extern int global_block_modified (block_t block);
extern void record_global_poke (void *ptr);
extern void sync_global_ptr (void *bptr, int wait);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 24/43: eth-multiplexer: Fix error handling., (continued)
- [hurd] 24/43: eth-multiplexer: Fix error handling., Samuel Thibault, 2017/09/11
- [hurd] 12/43: Fix typo., Samuel Thibault, 2017/09/11
- [hurd] 21/43: startup: Fix retrieving the privileged ports., Samuel Thibault, 2017/09/11
- [hurd] 25/43: eth-multiplexer: Implement getting the devices flags., Samuel Thibault, 2017/09/11
- [hurd] 20/43: ext2fs: Fix warning., Samuel Thibault, 2017/09/11
- [hurd] 18/43: Make build system more robust., Samuel Thibault, 2017/09/11
- [hurd] 14/43: procfs: Provide 'hostinfo'., Samuel Thibault, 2017/09/11
- [hurd] 23/43: startup: Improve error handling., Samuel Thibault, 2017/09/11
- [hurd] 28/43: eth-multiplexer: Allow setting of flags., Samuel Thibault, 2017/09/11
- [hurd] 33/43: libdiskfs: Use control class for the singleton 'bootinfo'., Samuel Thibault, 2017/09/11
- [hurd] 31/43: ext2fs: Improve inlining.,
Samuel Thibault <=
- [hurd] 08/43: trans/fakeroot: Obey O_NOFOLLOW., Samuel Thibault, 2017/09/11
- [hurd] 35/43: libnetfs: Remove redundant type checks., Samuel Thibault, 2017/09/11
- [hurd] 26/43: eth-multiplexer: Remove local definiton., Samuel Thibault, 2017/09/11
- [hurd] 34/43: libdiskfs: Simplify type checks., Samuel Thibault, 2017/09/11
- [hurd] 16/43: Simplify deallocations., Samuel Thibault, 2017/09/11
- [hurd] 29/43: eth-multiplexer: Respect interfaces up flags., Samuel Thibault, 2017/09/11
- [hurd] 36/43: startup: Don't spin on host_reboot failures., Samuel Thibault, 2017/09/11
- [hurd] 30/43: Drop the register qualifier., Samuel Thibault, 2017/09/11
- [hurd] 02/43: trans: New random translator., Samuel Thibault, 2017/09/11
- [hurd] 43/43: storeio: Avoid calling mmap with zero size, Samuel Thibault, 2017/09/11