Skip to content

Commit

Permalink
tools/liblockdep: explicitly declare lockdep API we call from liblockdep
Browse files Browse the repository at this point in the history
It seems that newer gcc complains about lack of explicit declaration for some
of the API we use, add it in.

Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
sashalevin committed Nov 6, 2015
1 parent e308e94 commit 2b62c2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tools/lib/lockdep/include/liblockdep/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
struct lockdep_map *nest_lock, unsigned long ip);
void lock_release(struct lockdep_map *lock, int nested,
unsigned long ip);
extern void debug_check_no_locks_freed(const void *from, unsigned long len);
extern void lockdep_init(void);

#define STATIC_LOCKDEP_MAP_INIT(_name, _key) \
{ .name = (_name), .key = (void *)(_key), }
Expand Down
3 changes: 2 additions & 1 deletion tools/lib/lockdep/uinclude/linux/lockdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <string.h>
#include <limits.h>
#include <linux/utsname.h>

#include <linux/compiler.h>

#define MAX_LOCK_DEPTH 2000UL

Expand Down Expand Up @@ -54,5 +54,6 @@ static struct new_utsname *init_utsname(void)
#define static_obj(x) 1

#define debug_show_all_locks()
extern void debug_check_no_locks_held(void);

#endif

0 comments on commit 2b62c2d

Please sign in to comment.