diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index ecbf93dc48..55d00e5072 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #if defined(LIBC_SCCS) && !defined(lint) | 10 | #if defined(LIBC_SCCS) && !defined(lint) |
11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.33 1998/11/20 11:18:50 d Exp $"; | 11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.34 1999/02/01 07:58:30 d Exp $"; |
12 | #endif /* LIBC_SCCS and not lint */ | 12 | #endif /* LIBC_SCCS and not lint */ |
13 | 13 | ||
14 | /* | 14 | /* |
@@ -102,6 +102,15 @@ static char rcsid[] = "$OpenBSD: malloc.c,v 1.33 1998/11/20 11:18:50 d Exp $"; | |||
102 | # define THREAD_LOCK() if (__isthreaded) _SPINLOCK(&malloc_lock) | 102 | # define THREAD_LOCK() if (__isthreaded) _SPINLOCK(&malloc_lock) |
103 | # define THREAD_UNLOCK() if (__isthreaded) _SPINUNLOCK(&malloc_lock) | 103 | # define THREAD_UNLOCK() if (__isthreaded) _SPINUNLOCK(&malloc_lock) |
104 | # define THREAD_LOCK_INIT() | 104 | # define THREAD_LOCK_INIT() |
105 | /* | ||
106 | * Malloc can't use the wrapped write() if it fails very early, so | ||
107 | * we use the unwrapped syscall _thread_sys_write() | ||
108 | */ | ||
109 | # define write _thread_sys_write | ||
110 | int write __P((int, const void *, size_t)); | ||
111 | # undef malloc | ||
112 | # undef realloc | ||
113 | # undef free | ||
105 | # endif | 114 | # endif |
106 | #else | 115 | #else |
107 | /* no threads */ | 116 | /* no threads */ |