Thu Sep 12 12:33:52 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* stdio-common/vfprintf.c: Include <libc-lock.h>.
- * stdio-common/vfscanf.c: Likewise.
+ (vfprintf): Only call __libc_cleanup_region_end if USE_IN_LIBIO,
+ thus matching the sense of the tests around
+ __libc_cleanup_region_start at the front of the function.
+ * stdio-common/vfscanf.c: Include <libc-lock.h>.
+ (UNLOCK_STREAM) [! USE_IN_LIBIO]: Call
+ __libc_cleanup_region_end, not __libc_cleanup_region_start.
* sysdeps/mach/libc-lock.h (__libc_cleanup_region_start): New
macro.
(__libc_cleanup_region_end): New macro.
- * stdio-common/vfscanf.c (UNLOCK_STREAM) [! USE_IN_LIBIO]: Call
- __libc_cleanup_region_end, not __libc_cleanup_region_start.
Thu Sep 12 03:35:27 1996 Ulrich Drepper <drepper@cygnus.com>
all_done:
/* Unlock the stream. */
+#ifdef USE_IN_LIBIO
+ /* (stdio has no locking yet.) */
__libc_cleanup_region_end (1);
+#endif
return done;
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <libc-lock.h>
#ifdef __GNUC__
#define HAVE_LONGLONG
# define LOCK_STREAM(S) \
__libc_cleanup_region_start (&__funlockfile, (S)); \
__flockfile (S)
-# define UNLOCK_STREAM __libc_cleanup_region_start (1)
+# define UNLOCK_STREAM __libc_cleanup_region_end (1)
#endif
#endif
/* 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 */
--- /dev/null
+/* 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.