diff options
author | Justus Winter <justus@gnupg.org> | 2017-06-19 21:20:57 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-08-05 18:42:22 +0200 |
commit | 835b293d35a209d38047126443d41fa7090daa4c (patch) | |
tree | 5bf956895e6030f91cd618fb191b2151f6d25423 /pfinet/glue-include/linux/sched.h | |
parent | dc0b5a43224999223a246870912b0f292b1980e9 (diff) | |
download | hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.gz hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.bz2 hurd-835b293d35a209d38047126443d41fa7090daa4c.zip |
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating
errors much easier.
Diffstat (limited to 'pfinet/glue-include/linux/sched.h')
-rw-r--r-- | pfinet/glue-include/linux/sched.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pfinet/glue-include/linux/sched.h b/pfinet/glue-include/linux/sched.h index e39263e5..2446e88c 100644 --- a/pfinet/glue-include/linux/sched.h +++ b/pfinet/glue-include/linux/sched.h @@ -6,7 +6,7 @@ #include <mach.h> #include <hurd/hurd_types.h> #include <limits.h> -#include <assert.h> +#include <assert-backtrace.h> #include <pthread.h> #include <errno.h> @@ -105,7 +105,7 @@ interruptible_sleep_on_timeout (struct wait_queue **p, struct timespec *tsp) if (c == 0) { c = malloc (sizeof **condp); - assert (c); + assert_backtrace (c); pthread_cond_init (c, NULL); *condp = c; } @@ -134,21 +134,21 @@ wake_up_interruptible (struct wait_queue **p) static inline void add_wait_queue(struct wait_queue ** p, struct wait_queue * wait) { - assert (current->next_wait == 0); + assert_backtrace (current->next_wait == 0); current->next_wait = p; } static inline void remove_wait_queue(struct wait_queue ** p, struct wait_queue * wait) { - assert (current->next_wait == p); + assert_backtrace (current->next_wait == p); current->next_wait = 0; } static inline void schedule (void) { - assert (current->next_wait); + assert_backtrace (current->next_wait); interruptible_sleep_on_timeout (current->next_wait, NULL); } @@ -201,8 +201,8 @@ schedule_timeout (long timeout) static inline int send_sig (u_long signo, struct task_struct *task, int priv) { - assert (signo == SIGPIPE); - assert (task == current); + assert_backtrace (signo == SIGPIPE); + assert_backtrace (task == current); return 0; } |