diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-07-22 16:23:12 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-07-22 16:23:12 +0000 |
commit | 100a97ad44295e320fb0088ae5d443cedcd7ad27 (patch) | |
tree | a263963145ca88bbb89e63f338326ef38515f512 /libdiskfs | |
parent | 61c31aee2debccb68bbdb3cc95f942cfc9d55947 (diff) |
Formerly diskfs.h.~33~
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/diskfs.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index f26d8663..384f27c1 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -18,12 +18,6 @@ #ifndef _HURD_DISKFS #define _HURD_DISKFS -#ifdef MAKING_DISKFS -#include "../machine/diskfs_machdep.h" -#else -#include <hurd/machine/diskfs_machdep.h> -#endif - /* Each user port referring to a file points to one of these (with the aid of the ports library. */ struct protid @@ -861,4 +855,31 @@ int ports_demuxer (mach_msg_header_t *, mach_msg_header_t *); routines have the prefix `diskfs_S_'; `in' arguments of type file_t or io_t appear as `struct protid *' to the stub. */ + +/* Exception handling */ + +#include <cthreads.h> +#include <setjmp.h> +struct thread_stuff +{ + jmp_buf buf; + struct thread_stuff *link; +}; + +#define diskfs_catch_exception() \ + ({ \ + struct thread_stuff *tmp; \ + tmp = __builtin_alloca (sizeof (struct thread_stuff)); \ + tmp->link = (struct thread_stuff *)cthread_data (cthread_self ()); \ + cthread_set_data (cthread_self (), (any_t)tmp); \ + setjmp (tmp->buf); \ + }) + +#define diskfs_end_catch_exception() \ + (void) ({ \ + struct thread_stuff *tmp; \ + tmp = (struct thread_stuff *)cthread_data (cthread_self ()); \ + (void) cthread_set_data (cthread_self (), (any_t)tmp->link); \ + }) + #endif |