sync
This commit is contained in:
parent
f609457dcf
commit
62073e0295
318 changed files with 8112 additions and 4346 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: syscall.S,v 1.8 2016/05/07 19:05:21 guenther Exp $ */
|
||||
/* $OpenBSD: syscall.S,v 1.9 2023/05/11 19:35:50 guenther Exp $ */
|
||||
/* $NetBSD: syscall.S,v 1.2 2002/06/03 18:30:33 fvdl Exp $ */
|
||||
|
||||
/*-
|
||||
|
@ -39,4 +39,18 @@
|
|||
|
||||
#include "SYS.h"
|
||||
|
||||
RSYSCALL(syscall)
|
||||
SYSENTRY(syscall)
|
||||
RETGUARD_SETUP(_thread_sys_syscall, r11)
|
||||
#ifdef _RET_PROTECTOR
|
||||
pushq 8(%rsp) /* repush 6th argument */
|
||||
#endif
|
||||
RETGUARD_PUSH(r11)
|
||||
SYSTRAP(syscall)
|
||||
HANDLE_ERRNO;
|
||||
RETGUARD_POP(r11)
|
||||
#ifdef _RET_PROTECTOR
|
||||
addq $8,%rsp /* repush 6th argument */
|
||||
#endif
|
||||
RETGUARD_CHECK(_thread_sys_syscall, r11)
|
||||
ret
|
||||
SYSCALL_END(syscall)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: malloc.c,v 1.282 2023/04/21 06:19:40 jsg Exp $ */
|
||||
/* $OpenBSD: malloc.c,v 1.283 2023/05/10 07:58:06 otto Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008, 2010, 2011, 2016, 2023 Otto Moerbeek <otto@drijf.net>
|
||||
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
|
||||
|
@ -264,24 +264,6 @@ static void malloc_exit(void);
|
|||
(sz) = (uintptr_t)(r)->p & MALLOC_PAGEMASK, \
|
||||
(sz) = ((sz) == 0 ? (r)->size : B2SIZE((sz) - 1))
|
||||
|
||||
static inline void
|
||||
_MALLOC_LEAVE(struct dir_info *d)
|
||||
{
|
||||
if (d->malloc_mt) {
|
||||
d->active--;
|
||||
_MALLOC_UNLOCK(d->mutex);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
_MALLOC_ENTER(struct dir_info *d)
|
||||
{
|
||||
if (d->malloc_mt) {
|
||||
_MALLOC_LOCK(d->mutex);
|
||||
d->active++;
|
||||
}
|
||||
}
|
||||
|
||||
static inline size_t
|
||||
hash(void *p)
|
||||
{
|
||||
|
@ -879,9 +861,7 @@ map(struct dir_info *d, size_t sz, int zero_fill)
|
|||
return p;
|
||||
}
|
||||
if (psz <= 1) {
|
||||
_MALLOC_LEAVE(d);
|
||||
p = MMAP(cache->max * sz, d->mmap_flag);
|
||||
_MALLOC_ENTER(d);
|
||||
if (p != MAP_FAILED) {
|
||||
STATS_ADD(d->malloc_used, cache->max * sz);
|
||||
cache->length = cache->max - 1;
|
||||
|
@ -901,9 +881,7 @@ map(struct dir_info *d, size_t sz, int zero_fill)
|
|||
}
|
||||
|
||||
}
|
||||
_MALLOC_LEAVE(d);
|
||||
p = MMAP(sz, d->mmap_flag);
|
||||
_MALLOC_ENTER(d);
|
||||
if (p != MAP_FAILED)
|
||||
STATS_ADD(d->malloc_used, sz);
|
||||
/* zero fill not needed */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue