summaryrefslogtreecommitdiff
path: root/lib/libpthread/tests/test_setjmp.c
diff options
context:
space:
mode:
authorPeter Galbavy <peter@cvs.openbsd.org>1998-07-21 13:22:23 +0000
committerPeter Galbavy <peter@cvs.openbsd.org>1998-07-21 13:22:23 +0000
commit0294ed9251849ce79ab3d4cc45841a9f6de82844 (patch)
tree30d684d4c18138e4ccaf59b61acadc667e515c74 /lib/libpthread/tests/test_setjmp.c
parent43b686d61558c0957f1779c747214ddef20a2252 (diff)
Complete initial import from mySQL 3.22.4 (mit-pthreads/).
Lots of dross to move and remove yet. At minimum: o remove GNU config and GNU Makefiles o build arch directory and migrate away machdep/ o rebuild BSD Makefiles o move notes etc. into doc/
Diffstat (limited to 'lib/libpthread/tests/test_setjmp.c')
-rw-r--r--lib/libpthread/tests/test_setjmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libpthread/tests/test_setjmp.c b/lib/libpthread/tests/test_setjmp.c
new file mode 100644
index 00000000000..ea24ecd63bc
--- /dev/null
+++ b/lib/libpthread/tests/test_setjmp.c
@@ -0,0 +1,13 @@
+#include <setjmp.h>
+
+main()
+{
+jmp_buf foo;
+
+if (setjmp(foo)) {
+ exit(0);
+}
+printf("Hi mom\n");
+longjmp(foo, 1);
+printf("Should never reach here\n");
+}