aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-10-16 17:01:47 +0100
committerEric B Munson <ebmunson@us.ibm.com>2008-10-21 11:14:23 +0100
commit82ce959dfa0edbe4a33d8a632508552106b7d7ec (patch)
treede0214301cefb2f92f4bce02a89c2308d57fcef9 /init.c
parentb92d7be2fadf311664fc50bf9c563d42afa6fc23 (diff)
downloadlibhugetlbfs-82ce959dfa0edbe4a33d8a632508552106b7d7ec.tar.gz
move to a new library local idiom
Currently we have three types of function: file local -- marked static in the normal way, library local -- external but prefixed with __lh_ library exported -- external and listed in the library.lds file While the library prefix works, it does not allow functions to trivially move from file local to library local as all references to the function have to be modified to the new name. This patch introduces a new idiom. When a function is intended to be library local it is already necessary to declare that function in the libhugetlbfs_internal.h, if we also add a single define for that function adding the __lh_ prefix (as below) then all other references including the original definition may use the original name unchanged but the function will remain unexported: #define hpool_sizes __lh_hpool_sizes extern int hpool_sizes(struct hpage_pool *, int); This patch converts all current library local functions to this new idiom. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Adam Litke <agl@us.ibm.com> Acked-by: Mel Gorman <mel@csn.ul.ie>
Diffstat (limited to 'init.c')
-rw-r--r--init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/init.c b/init.c
index f58d34b..f9cd804 100644
--- a/init.c
+++ b/init.c
@@ -21,11 +21,11 @@
static void __attribute__ ((constructor)) setup_libhugetlbfs(void)
{
- __lh_hugetlbfs_setup_debug();
- __lh_setup_mounts();
- __lh_setup_features();
+ hugetlbfs_setup_debug();
+ setup_mounts();
+ setup_features();
#ifndef NO_ELFLINK
- __lh_hugetlbfs_setup_elflink();
+ hugetlbfs_setup_elflink();
#endif
- __lh_hugetlbfs_setup_morecore();
+ hugetlbfs_setup_morecore();
}