[PATCH v4 02/37] unwind: make alloc_mmap_cache unwind.c local

Masatake YAMATO yamato at redhat.com
Wed Apr 16 06:33:00 UTC 2014


alloc_mmap_cache was used only in unwind.c.
So I change its scope to static and remove its
declaration from defs.h

Signed-off-by: Masatake YAMATO <yamato at redhat.com>
---
 defs.h   | 1 -
 unwind.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/defs.h b/defs.h
index 3dbecb7..7a838bb 100644
--- a/defs.h
+++ b/defs.h
@@ -730,7 +730,6 @@ extern void tv_div(struct timeval *, struct timeval *, int);
 extern void init_unwind_addr_space(void);
 extern void init_libunwind_ui(struct tcb *tcp);
 extern void free_libunwind_ui(struct tcb *tcp);
-extern void alloc_mmap_cache(struct tcb* tcp);
 extern void delete_mmap_cache(struct tcb* tcp);
 extern void print_stacktrace(struct tcb* tcp);
 #endif
diff --git a/unwind.c b/unwind.c
index c16fdd1..7c179bf 100644
--- a/unwind.c
+++ b/unwind.c
@@ -78,7 +78,7 @@ free_libunwind_ui(struct tcb *tcp)
  *
  * The cache must be refreshed after some syscall: mmap, mprotect, munmap, execve
  */
-void
+static void
 alloc_mmap_cache(struct tcb* tcp)
 {
 	unsigned long start_addr, end_addr, mmap_offset;
-- 
1.9.0





More information about the Strace-devel mailing list