diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/mach/libc-lock.h | 14 | ||||
-rw-r--r-- | sysdeps/stub/intr-msg.h | 15 |
2 files changed, 29 insertions, 0 deletions
diff --git a/sysdeps/mach/libc-lock.h b/sysdeps/mach/libc-lock.h index 2c39592717..ea3d306a52 100644 --- a/sysdeps/mach/libc-lock.h +++ b/sysdeps/mach/libc-lock.h @@ -56,5 +56,19 @@ typedef struct __libc_lock_opaque__ __libc_lock_t; /* Unlock the named lock variable. */ #define __libc_lock_unlock(NAME) __mutex_unlock (&(NAME)) +/* Start a critical region with a cleanup function */ +#define __libc_cleanup_region_start(FCT, ARG) \ +{ \ + (typeof FCT) __save_FCT = FCT; \ + (typeof ARG) __save_ARG = ARG; \ + /* close brace is in __libc_cleanup_region_end below. */ + +/* End a critical region started with __libc_cleanup_region_start. */ +#define __libc_cleanup_region_end(DOIT) \ + if (DOIT) \ + (* __save_FCT)(__save_ARG); \ +} + + #endif /* libc-lock.h */ diff --git a/sysdeps/stub/intr-msg.h b/sysdeps/stub/intr-msg.h new file mode 100644 index 0000000000..0186aa3323 --- /dev/null +++ b/sysdeps/stub/intr-msg.h @@ -0,0 +1,15 @@ +/* Stubby version of intr-msg.h. */ + +/* This file must be written in machine-dependent form for each hurd port. + and define the following: + + INTR_MSG_TRAP + INTR_MSG_BACK_OUT + SYSCALL_EXAMINE + struct mach_msg_trap_args + MSG_EXAMINE + + See sysdeps/mach/hurd/i386/intr-msg.h for an example. */ + + +#error Could not find machine-dependent intr-msg.h file. |