diff options
author | 1999-01-10 23:09:36 +0000 | |
---|---|---|
committer | 1999-01-10 23:09:36 +0000 | |
commit | 519c19ff923b139c8a22f023153760a45ad850ea (patch) | |
tree | 00c27e10f66a091564a62febb19ae579fc93849a | |
parent | add some debug msgs; clean (diff) | |
download | wireguard-openbsd-519c19ff923b139c8a22f023153760a45ad850ea.tar.xz wireguard-openbsd-519c19ff923b139c8a22f023153760a45ad850ea.zip |
initialise locks properly
-rw-r--r-- | lib/libc_r/uthread/uthread_fd.c | 4 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_fd.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc_r/uthread/uthread_fd.c b/lib/libc_r/uthread/uthread_fd.c index 3db630be5f4..c46615b0270 100644 --- a/lib/libc_r/uthread/uthread_fd.c +++ b/lib/libc_r/uthread/uthread_fd.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: uthread_fd.c,v 1.9 1998/09/13 15:33:42 dt Exp $ - * $OpenBSD: uthread_fd.c,v 1.3 1998/12/23 22:49:46 d Exp $ + * $OpenBSD: uthread_fd.c,v 1.4 1999/01/10 23:09:36 d Exp $ * */ #include <errno.h> @@ -80,7 +80,7 @@ _thread_fd_table_init(int fd) ret = -1; } else { /* Initialise the file locks: */ - memset(&entry->lock, 0, sizeof(entry->lock)); + _SPINUNLOCK(&entry->lock); entry->r_owner = NULL; entry->w_owner = NULL; entry->r_fname = NULL; diff --git a/lib/libpthread/uthread/uthread_fd.c b/lib/libpthread/uthread/uthread_fd.c index 3db630be5f4..c46615b0270 100644 --- a/lib/libpthread/uthread/uthread_fd.c +++ b/lib/libpthread/uthread/uthread_fd.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: uthread_fd.c,v 1.9 1998/09/13 15:33:42 dt Exp $ - * $OpenBSD: uthread_fd.c,v 1.3 1998/12/23 22:49:46 d Exp $ + * $OpenBSD: uthread_fd.c,v 1.4 1999/01/10 23:09:36 d Exp $ * */ #include <errno.h> @@ -80,7 +80,7 @@ _thread_fd_table_init(int fd) ret = -1; } else { /* Initialise the file locks: */ - memset(&entry->lock, 0, sizeof(entry->lock)); + _SPINUNLOCK(&entry->lock); entry->r_owner = NULL; entry->w_owner = NULL; entry->r_fname = NULL; |