summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-07-30 10:19:58 +0000
committerVolker Lendecke <vl@samba.org>2014-07-31 16:20:53 +0200
commit85a03c88446500609f6f2e8680bf940a7811e593 (patch)
treea6779ea7d57eef576d3f222e8563d62265ea424b /lib
parent83eac53c03511b8599f26a961f89dbd92425d9ab (diff)
downloadsamba-85a03c88446500609f6f2e8680bf940a7811e593.tar.gz
debug: Remove thread-related code from debug.c
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jul 31 16:20:53 CEST 2014 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r--lib/util/debug.c54
-rw-r--r--lib/util/debug.h34
2 files changed, 0 insertions, 88 deletions
diff --git a/lib/util/debug.c b/lib/util/debug.c
index 80a3460e7a0..77d485f62a4 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -1063,57 +1063,3 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
SAFE_FREE(msgbuf);
return ret;
}
-
-
-/* the registered mutex handlers */
-static struct {
- const char *name;
- struct debug_ops ops;
-} debug_handlers;
-
-/**
- log suspicious usage - print comments and backtrace
-*/
-_PUBLIC_ void log_suspicious_usage(const char *from, const char *info)
-{
- if (!debug_handlers.ops.log_suspicious_usage) return;
-
- debug_handlers.ops.log_suspicious_usage(from, info);
-}
-
-
-/**
- print suspicious usage - print comments and backtrace
-*/
-_PUBLIC_ void print_suspicious_usage(const char* from, const char* info)
-{
- if (!debug_handlers.ops.print_suspicious_usage) return;
-
- debug_handlers.ops.print_suspicious_usage(from, info);
-}
-
-_PUBLIC_ uint32_t get_task_id(void)
-{
- if (debug_handlers.ops.get_task_id) {
- return debug_handlers.ops.get_task_id();
- }
- return getpid();
-}
-
-_PUBLIC_ void log_task_id(void)
-{
- if (!debug_handlers.ops.log_task_id) return;
-
- if (!reopen_logs_internal()) return;
-
- debug_handlers.ops.log_task_id(state.fd);
-}
-
-/**
- register a set of debug handlers.
-*/
-_PUBLIC_ void register_debug_handlers(const char *name, struct debug_ops *ops)
-{
- debug_handlers.name = name;
- debug_handlers.ops = *ops;
-}
diff --git a/lib/util/debug.h b/lib/util/debug.h
index f7ebfc02695..f393f1b695d 100644
--- a/lib/util/debug.h
+++ b/lib/util/debug.h
@@ -250,38 +250,4 @@ typedef void (*debug_callback_fn)(void *private_ptr, int level, const char *msg)
*/
void debug_set_callback(void *private_ptr, debug_callback_fn fn);
-/**
- log suspicious usage - print comments and backtrace
-*/
-_PUBLIC_ void log_suspicious_usage(const char *from, const char *info);
-
-/**
- print suspicious usage - print comments and backtrace
-*/
-_PUBLIC_ void print_suspicious_usage(const char* from, const char* info);
-_PUBLIC_ uint32_t get_task_id(void);
-_PUBLIC_ void log_task_id(void);
-
-/* the debug operations structure - contains function pointers to
- various debug implementations of each operation */
-struct debug_ops {
- /* function to log (using DEBUG) suspicious usage of data structure */
- void (*log_suspicious_usage)(const char* from, const char* info);
-
- /* function to log (using printf) suspicious usage of data structure.
- * To be used in circumstances when using DEBUG would cause loop. */
- void (*print_suspicious_usage)(const char* from, const char* info);
-
- /* function to return process/thread id */
- uint32_t (*get_task_id)(void);
-
- /* function to log process/thread id */
- void (*log_task_id)(int fd);
-};
-
-/**
- register a set of debug handlers.
-*/
-_PUBLIC_ void register_debug_handlers(const char *name, struct debug_ops *ops);
-
#endif