Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nathanw_sa]: src/lib/libpthread Silent failures are annoying.



details:   https://anonhg.NetBSD.org/src/rev/ea1f1f56d2ce
branches:  nathanw_sa
changeset: 506665:ea1f1f56d2ce
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Fri Jan 03 22:04:55 2003 +0000

description:
Silent failures are annoying.
Sprinkle some assert(0) after NOTREACHED points.

diffstat:

 lib/libpthread/pthread.c     |  6 +++++-
 lib/libpthread/pthread_sig.c |  3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r daaee2627dbf -r ea1f1f56d2ce lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c  Fri Jan 03 21:42:50 2003 +0000
+++ b/lib/libpthread/pthread.c  Fri Jan 03 22:04:55 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread.c,v 1.1.2.40 2003/01/02 19:06:20 nathanw Exp $ */
+/*     $NetBSD: pthread.c,v 1.1.2.41 2003/01/03 22:04:55 nathanw Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -313,6 +313,7 @@
        pthread_exit(retval);
 
        /* NOTREACHED */
+       assert(0);
 }
 
 
@@ -344,6 +345,9 @@
         * PT_FLAG_IDLED set), and so we can yield the processor safely.
         */
          sa_yield();
+
+        /* NOTREACHED*/
+        assert(0);
 }
 
 
diff -r daaee2627dbf -r ea1f1f56d2ce lib/libpthread/pthread_sig.c
--- a/lib/libpthread/pthread_sig.c      Fri Jan 03 21:42:50 2003 +0000
+++ b/lib/libpthread/pthread_sig.c      Fri Jan 03 22:04:55 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_sig.c,v 1.1.2.23 2003/01/02 06:41:08 nathanw Exp $     */
+/*     $NetBSD: pthread_sig.c,v 1.1.2.24 2003/01/03 22:04:56 nathanw Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -600,4 +600,5 @@
         */
        _setcontext_u(uc);
                /* NOTREACHED */
+       assert(0);
 }



Home | Main Index | Thread Index | Old Index