Module Name: src
Committed By: riastradh
Date: Sun Apr 10 10:38:33 UTC 2022
Modified Files:
src/lib/libpthread: pthread_attr.c pthread_cancelstub.c pthread_lock.c
pthread_misc.c pthread_mutex.c pthread_queue.h pthread_specific.c
pthread_spin.c pthread_tsd.c pthread_types.h
Log Message:
pthread: Nix trailing whitespace.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libpthread/pthread_attr.c
cvs rdiff -u -r1.41 -r1.42 src/lib/libpthread/pthread_cancelstub.c
cvs rdiff -u -r1.35 -r1.36 src/lib/libpthread/pthread_lock.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libpthread/pthread_misc.c
cvs rdiff -u -r1.82 -r1.83 src/lib/libpthread/pthread_mutex.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libpthread/pthread_queue.h
cvs rdiff -u -r1.27 -r1.28 src/lib/libpthread/pthread_specific.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libpthread/pthread_spin.c
cvs rdiff -u -r1.24 -r1.25 src/lib/libpthread/pthread_tsd.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libpthread/pthread_types.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libpthread/pthread_attr.c
diff -u src/lib/libpthread/pthread_attr.c:1.20 src/lib/libpthread/pthread_attr.c:1.21
--- src/lib/libpthread/pthread_attr.c:1.20 Sat Feb 12 14:59:32 2022
+++ src/lib/libpthread/pthread_attr.c Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_attr.c,v 1.20 2022/02/12 14:59:32 riastradh Exp $ */
+/* $NetBSD: pthread_attr.c,v 1.21 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_attr.c,v 1.20 2022/02/12 14:59:32 riastradh Exp $");
+__RCSID("$NetBSD: pthread_attr.c,v 1.21 2022/04/10 10:38:33 riastradh Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -113,7 +113,7 @@ pthread_attr_get_np(pthread_t thread, pt
if (p == NULL)
return ENOMEM;
- attr->pta_flags = thread->pt_flags &
+ attr->pta_flags = thread->pt_flags &
(PT_FLAG_DETACHED | PT_FLAG_SCOPE_SYSTEM | PT_FLAG_EXPLICIT_SCHED);
p->ptap_namearg = thread->pt_name;
@@ -309,7 +309,7 @@ pthread_attr_getschedparam(const pthread
p = attr->pta_private;
if (p == NULL)
memset(param, 0, sizeof(*param));
- else
+ else
*param = p->ptap_sp;
return 0;
}
Index: src/lib/libpthread/pthread_cancelstub.c
diff -u src/lib/libpthread/pthread_cancelstub.c:1.41 src/lib/libpthread/pthread_cancelstub.c:1.42
--- src/lib/libpthread/pthread_cancelstub.c:1.41 Sat Feb 12 14:59:32 2022
+++ src/lib/libpthread/pthread_cancelstub.c Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_cancelstub.c,v 1.41 2022/02/12 14:59:32 riastradh Exp $ */
+/* $NetBSD: pthread_cancelstub.c,v 1.42 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#undef _FORTIFY_SOURCE
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_cancelstub.c,v 1.41 2022/02/12 14:59:32 riastradh Exp $");
+__RCSID("$NetBSD: pthread_cancelstub.c,v 1.42 2022/04/10 10:38:33 riastradh Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -160,7 +160,7 @@ accept(int s, struct sockaddr *addr, soc
TESTCANCEL(self);
retval = _sys_accept(s, addr, addrlen);
TESTCANCEL(self);
-
+
return retval;
}
@@ -205,7 +205,7 @@ clock_nanosleep(clockid_t clock_id, int
TESTCANCEL(self);
retval = _sys_clock_nanosleep(clock_id, flags, rqtp, rmtp);
TESTCANCEL(self);
-
+
return retval;
}
@@ -219,7 +219,7 @@ close(int d)
TESTCANCEL(self);
retval = _sys_close(d);
TESTCANCEL(self);
-
+
return retval;
}
@@ -233,7 +233,7 @@ connect(int s, const struct sockaddr *ad
TESTCANCEL(self);
retval = _sys_connect(s, addr, namelen);
TESTCANCEL(self);
-
+
return retval;
}
@@ -264,7 +264,7 @@ fdatasync(int d)
TESTCANCEL(self);
retval = _sys_fdatasync(d);
TESTCANCEL(self);
-
+
return retval;
}
@@ -278,7 +278,7 @@ fsync(int d)
TESTCANCEL(self);
retval = _sys_fsync(d);
TESTCANCEL(self);
-
+
return retval;
}
@@ -492,7 +492,7 @@ pread(int d, void *buf, size_t nbytes, o
}
int
-__pselect50(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+__pselect50(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
const struct timespec *timeout, const sigset_t *sigmask)
{
int retval;
@@ -594,7 +594,7 @@ recvmmsg(int s, struct mmsghdr *mmsg, un
}
int
-__select50(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+__select50(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
struct timeval *timeout)
{
int retval;
Index: src/lib/libpthread/pthread_lock.c
diff -u src/lib/libpthread/pthread_lock.c:1.35 src/lib/libpthread/pthread_lock.c:1.36
--- src/lib/libpthread/pthread_lock.c:1.35 Sat Feb 12 14:59:32 2022
+++ src/lib/libpthread/pthread_lock.c Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_lock.c,v 1.35 2022/02/12 14:59:32 riastradh Exp $ */
+/* $NetBSD: pthread_lock.c,v 1.36 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_lock.c,v 1.35 2022/02/12 14:59:32 riastradh Exp $");
+__RCSID("$NetBSD: pthread_lock.c,v 1.36 2022/04/10 10:38:33 riastradh Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -143,7 +143,7 @@ const struct pthread_lock_ops *pthread__
* Prevent this routine from being inlined. The common case is no
* contention and it's better to not burden the instruction decoder.
*/
-static void
+static void
pthread__spinlock_slow(pthread_spin_t *lock)
{
pthread_t self;
Index: src/lib/libpthread/pthread_misc.c
diff -u src/lib/libpthread/pthread_misc.c:1.18 src/lib/libpthread/pthread_misc.c:1.19
--- src/lib/libpthread/pthread_misc.c:1.18 Sat Feb 12 14:59:32 2022
+++ src/lib/libpthread/pthread_misc.c Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_misc.c,v 1.18 2022/02/12 14:59:32 riastradh Exp $ */
+/* $NetBSD: pthread_misc.c,v 1.19 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_misc.c,v 1.18 2022/02/12 14:59:32 riastradh Exp $");
+__RCSID("$NetBSD: pthread_misc.c,v 1.19 2022/04/10 10:38:33 riastradh Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -77,7 +77,7 @@ pthread_getschedparam(pthread_t thread,
}
int
-pthread_setschedparam(pthread_t thread, int policy,
+pthread_setschedparam(pthread_t thread, int policy,
const struct sched_param *param)
{
struct sched_param sp;
Index: src/lib/libpthread/pthread_mutex.c
diff -u src/lib/libpthread/pthread_mutex.c:1.82 src/lib/libpthread/pthread_mutex.c:1.83
--- src/lib/libpthread/pthread_mutex.c:1.82 Sat Feb 12 14:59:32 2022
+++ src/lib/libpthread/pthread_mutex.c Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_mutex.c,v 1.82 2022/02/12 14:59:32 riastradh Exp $ */
+/* $NetBSD: pthread_mutex.c,v 1.83 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2003, 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
* attempting to acquire that spinlock will needlessly busy wait.
*
* There is no good way to know that the holding thread is no longer
- * running, nor to request a wake-up once it has begun running again.
+ * running, nor to request a wake-up once it has begun running again.
* Of more concern, threads in the SCHED_FIFO class do not have a
* limited time quantum and so could spin forever, preventing the
* thread holding the spinlock from getting CPU time: it would never
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_mutex.c,v 1.82 2022/02/12 14:59:32 riastradh Exp $");
+__RCSID("$NetBSD: pthread_mutex.c,v 1.83 2022/04/10 10:38:33 riastradh Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -262,7 +262,7 @@ pthread__mutex_spin(pthread_mutex_t *ptm
break;
if (thread->pt_lwpctl->lc_curcpu == LWPCTL_CPU_NONE)
break;
- if (count < 128)
+ if (count < 128)
count += count;
for (i = count; i != 0; i--)
pthread__mutex_pause();
@@ -608,7 +608,7 @@ pthread_mutexattr_settype(pthread_mutexa
int
pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int*proto)
{
-
+
pthread__error(EINVAL, "Invalid mutex attribute",
attr->ptma_magic == _PT_MUTEXATTR_MAGIC);
@@ -616,7 +616,7 @@ pthread_mutexattr_getprotocol(const pthr
return 0;
}
-int
+int
pthread_mutexattr_setprotocol(pthread_mutexattr_t* attr, int proto)
{
@@ -635,10 +635,10 @@ pthread_mutexattr_setprotocol(pthread_mu
}
}
-int
+int
pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *ceil)
{
-
+
pthread__error(EINVAL, "Invalid mutex attribute",
attr->ptma_magic == _PT_MUTEXATTR_MAGIC);
@@ -646,8 +646,8 @@ pthread_mutexattr_getprioceiling(const p
return 0;
}
-int
-pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, int ceil)
+int
+pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, int ceil)
{
pthread__error(EINVAL, "Invalid mutex attribute",
@@ -733,7 +733,7 @@ pthread__mutex_deferwake(pthread_t self,
}
int
-pthread_mutex_getprioceiling(const pthread_mutex_t *ptm, int *ceil)
+pthread_mutex_getprioceiling(const pthread_mutex_t *ptm, int *ceil)
{
pthread__error(EINVAL, "Invalid mutex",
@@ -744,7 +744,7 @@ pthread_mutex_getprioceiling(const pthre
}
int
-pthread_mutex_setprioceiling(pthread_mutex_t *ptm, int ceil, int *old_ceil)
+pthread_mutex_setprioceiling(pthread_mutex_t *ptm, int ceil, int *old_ceil)
{
int error;
Index: src/lib/libpthread/pthread_queue.h
diff -u src/lib/libpthread/pthread_queue.h:1.5 src/lib/libpthread/pthread_queue.h:1.6
--- src/lib/libpthread/pthread_queue.h:1.5 Mon Oct 5 23:33:48 2009
+++ src/lib/libpthread/pthread_queue.h Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_queue.h,v 1.5 2009/10/05 23:33:48 rmind Exp $ */
+/* $NetBSD: pthread_queue.h,v 1.6 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* Definition of a queue interface for the pthread library.
* Style modeled on the sys/queue.h macros; implementation taken from
* the tail queue, with the added property of static initializability
- * (and a corresponding extra cost in the _INSERT_TAIL() function.
+ * (and a corresponding extra cost in the _INSERT_TAIL() function.
*/
/*
Index: src/lib/libpthread/pthread_specific.c
diff -u src/lib/libpthread/pthread_specific.c:1.27 src/lib/libpthread/pthread_specific.c:1.28
--- src/lib/libpthread/pthread_specific.c:1.27 Sat Feb 12 14:59:32 2022
+++ src/lib/libpthread/pthread_specific.c Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_specific.c,v 1.27 2022/02/12 14:59:32 riastradh Exp $ */
+/* $NetBSD: pthread_specific.c,v 1.28 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_specific.c,v 1.27 2022/02/12 14:59:32 riastradh Exp $");
+__RCSID("$NetBSD: pthread_specific.c,v 1.28 2022/04/10 10:38:33 riastradh Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -64,10 +64,10 @@ pthread_setspecific(pthread_key_t key, c
self = pthread__self();
/*
- * We can't win here on constness. Having been given a
+ * We can't win here on constness. Having been given a
* "const void *", we can only assign it to other const void *,
* and return it from functions that are const void *, without
- * generating a warning.
+ * generating a warning.
*/
return pthread__add_specific(self, key, value);
}
Index: src/lib/libpthread/pthread_spin.c
diff -u src/lib/libpthread/pthread_spin.c:1.9 src/lib/libpthread/pthread_spin.c:1.10
--- src/lib/libpthread/pthread_spin.c:1.9 Sat Feb 12 14:59:32 2022
+++ src/lib/libpthread/pthread_spin.c Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_spin.c,v 1.9 2022/02/12 14:59:32 riastradh Exp $ */
+/* $NetBSD: pthread_spin.c,v 1.10 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007 The NetBSD Foundation, Inc.
@@ -29,12 +29,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-/*
+/*
* Public (POSIX-specified) spinlocks.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_spin.c,v 1.9 2022/02/12 14:59:32 riastradh Exp $");
+__RCSID("$NetBSD: pthread_spin.c,v 1.10 2022/04/10 10:38:33 riastradh Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -64,7 +64,7 @@ pthread_spin_init(pthread_spinlock_t *lo
/*
* We don't actually use the pshared flag for anything;
- * CPU simple locks have all the process-shared properties
+ * CPU simple locks have all the process-shared properties
* that we want anyway.
*/
lock->pts_flags = pshared;
Index: src/lib/libpthread/pthread_tsd.c
diff -u src/lib/libpthread/pthread_tsd.c:1.24 src/lib/libpthread/pthread_tsd.c:1.25
--- src/lib/libpthread/pthread_tsd.c:1.24 Sat Feb 12 14:59:32 2022
+++ src/lib/libpthread/pthread_tsd.c Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_tsd.c,v 1.24 2022/02/12 14:59:32 riastradh Exp $ */
+/* $NetBSD: pthread_tsd.c,v 1.25 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2007, 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_tsd.c,v 1.24 2022/02/12 14:59:32 riastradh Exp $");
+__RCSID("$NetBSD: pthread_tsd.c,v 1.25 2022/04/10 10:38:33 riastradh Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@@ -132,10 +132,10 @@ pthread_key_create(pthread_key_t *key, v
/* Get a lock on the allocation list */
pthread_mutex_lock(&tsd_mutex);
-
+
/* Find an available slot:
* The condition for an available slot is one with the destructor
- * not being NULL. If the desired destructor is NULL we set it to
+ * not being NULL. If the desired destructor is NULL we set it to
* our own internal destructor to satisfy the non NULL condition.
*/
/* 1. Search from "nextkey" to the end of the list. */
@@ -150,7 +150,7 @@ pthread_key_create(pthread_key_t *key, v
for (i = 0; i < nextkey; i++)
if (pthread__tsd_destructors[i] == NULL)
break;
-
+
if (i == nextkey) {
/* If we didn't find one here, there isn't one
* to be found.
@@ -229,7 +229,7 @@ pthread_key_delete(pthread_key_t key)
* Date: Thu, 21 Feb 2002 09:06:17 -0500
* http://groups.google.com/groups?\
* hl=en&selm=u97d8.29%24fL6.200%40news.cpqcorp.net
- *
+ *
* Given:
*
* 1: Applications are not required to clear keys in all
@@ -328,7 +328,7 @@ pthread__destroy_tsd(pthread_t self)
return;
/* Butenhof, section 5.4.2 (page 167):
- *
+ *
* ``Also, Pthreads sets the thread-specific data value for a
* key to NULL before calling that key's destructor (passing
* the previous value of the key) when a thread terminates [*].
Index: src/lib/libpthread/pthread_types.h
diff -u src/lib/libpthread/pthread_types.h:1.26 src/lib/libpthread/pthread_types.h:1.27
--- src/lib/libpthread/pthread_types.h:1.26 Wed Mar 10 15:05:11 2021
+++ src/lib/libpthread/pthread_types.h Sun Apr 10 10:38:33 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_types.h,v 1.26 2021/03/10 15:05:11 christos Exp $ */
+/* $NetBSD: pthread_types.h,v 1.27 2022/04/10 10:38:33 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2008, 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
/*
* We use the "pthread_spin_t" name internally; "pthread_spinlock_t" is the
- * POSIX spinlock object.
+ * POSIX spinlock object.
*
* C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer.
* This does not work for volatile types. Since C++ does not touch the guts
@@ -210,7 +210,7 @@ struct __pthread_spinlock_st {
__pthread_spin_t pts_spin;
int pts_flags;
};
-
+
#define _PT_SPINLOCK_MAGIC 0x77770007
#define _PT_SPINLOCK_DEAD 0xDEAD0007
#define _PT_SPINLOCK_PSHARED 0x00000001