diff options
author | Joseph Myers <joseph@codesourcery.com> | 2019-02-26 15:01:50 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2019-02-26 15:01:50 +0000 |
commit | aa0e46636a5b71b609a41e9ab97134cd76ac1522 (patch) | |
tree | 5dc47d4cf09cc97a969369243023513145f7afad /sysdeps/mach/hurd/htl | |
parent | e0cb7b6131ee5f2dca2938069b8b9590304e6f6b (diff) | |
download | glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.tar.gz glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.tar.xz glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.zip |
Break further lines before not after operators.
This patch continues the process of fixing coding style to break lines before not after operators in accordance with the GNU Coding Standards, fixing such issues in a non-exhaustive selection of sysdeps files that had them. Tested for x86_64, and with build-many-glibcs.py. * sysdeps/arm/sysdep.h (#if condition): Break lines before rather than after operators. * sysdeps/mach/hurd/fork.c (__fork): Likewise. * sysdeps/mach/hurd/getcwd.c (__hurd_canonicalize_directory_name_internal): Likewise. * sysdeps/mach/hurd/htl/pt-mutex-consistent.c (pthread_mutex_consistent): Likewise. * sysdeps/mach/hurd/htl/pt-mutex-init.c (_pthread_mutex_init): Likewise. * sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c (__pthread_mutex_transfer_np): Likewise. * sysdeps/mach/hurd/htl/pt-mutex-unlock.c (__pthread_mutex_unlock): Likewise. * sysdeps/mach/hurd/htl/pt-mutex.h (ROBUST_LOCK): Likewise. (mtx_owned_p): Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c (pthread_mutexattr_getrobust): Likewise. * sysdeps/mach/hurd/i386/init-first.c (init1): Likewise. * sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler): Likewise. * sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise. * sysdeps/mach/hurd/jmp-unwind.c (_longjmp_unwind): Likewise. * sysdeps/mach/hurd/kill.c (__kill): Likewise. * sysdeps/mach/hurd/mig-reply.c (__mig_get_reply_port): Likewise. * sysdeps/mach/hurd/ptrace.c (ptrace): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h (#if condition): Likewise. * sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo): Likewise. * sysdeps/unix/sysv/linux/bits/timex.h (STA_RONLY): Likewise. * sysdeps/unix/sysv/linux/csky/sysdep.h (#if condition): Likewise. * sysdeps/unix/sysv/linux/generic/____longjmp_chk.c (____longjmp_chk): Likewise. * sysdeps/unix/sysv/linux/generic/futimesat.c (futimesat): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INTERNAL_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INTERNAL_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c (__get_clockfreq_via_cpuinfo): Likewise.
Diffstat (limited to 'sysdeps/mach/hurd/htl')
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutex-consistent.c | 10 | ||||
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutex-init.c | 12 | ||||
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutex-unlock.c | 8 | ||||
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutex.h | 10 | ||||
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c | 4 |
6 files changed, 24 insertions, 24 deletions
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c index edcd9133ba..d6323d56dc 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c @@ -29,11 +29,11 @@ pthread_mutex_consistent (pthread_mutex_t *mtxp) int ret = EINVAL; unsigned int val = mtxp->__lock; - if ((mtxp->__flags & PTHREAD_MUTEX_ROBUST) != 0 && - (val & LLL_DEAD_OWNER) != 0 && - atomic_compare_and_exchange_bool_acq (&mtxp->__lock, - __getpid () | LLL_WAITERS, - val) == 0) + if ((mtxp->__flags & PTHREAD_MUTEX_ROBUST) != 0 + && (val & LLL_DEAD_OWNER) != 0 + && atomic_compare_and_exchange_bool_acq (&mtxp->__lock, + __getpid () | LLL_WAITERS, + val) == 0) { /* The mutex is now ours, and it's consistent. */ mtxp->__owner_id = _pthread_self ()->thread; diff --git a/sysdeps/mach/hurd/htl/pt-mutex-init.c b/sysdeps/mach/hurd/htl/pt-mutex-init.c index f3443819f4..6e036dfaec 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-init.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-init.c @@ -37,13 +37,13 @@ _pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp) if (attrp == NULL) attrp = &dfl_attr; - mtxp->__flags = (attrp->__pshared == PTHREAD_PROCESS_SHARED ? - GSYNC_SHARED : 0) | ((attrp-> - __prioceiling & PTHREAD_MUTEX_ROBUST) ? - PTHREAD_MUTEX_ROBUST : 0); + mtxp->__flags = (attrp->__pshared == PTHREAD_PROCESS_SHARED + ? GSYNC_SHARED : 0) | ((attrp->__prioceiling + & PTHREAD_MUTEX_ROBUST) + ? PTHREAD_MUTEX_ROBUST : 0); - mtxp->__type = attrp->__mutex_type + - (attrp->__mutex_type != __PTHREAD_MUTEX_TIMED); + mtxp->__type = (attrp->__mutex_type + + (attrp->__mutex_type != __PTHREAD_MUTEX_TIMED)); mtxp->__owner_id = 0; mtxp->__shpid = 0; diff --git a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c index 328bb1c315..7d1054c7b5 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c @@ -58,8 +58,8 @@ __pthread_mutex_transfer_np (pthread_mutex_t *mtxp, pthread_t th) /* Note that this can be used to transfer an inconsistent * mutex as well. The new owner will still have the same * flags as the original. */ - if (mtxp->__owner_id != self->thread || - (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ()) + if (mtxp->__owner_id != self->thread + || (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ()) ret = EPERM; else mtxp->__owner_id = pt->thread; diff --git a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c index fbdc31a773..00892b7eb9 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c @@ -65,15 +65,15 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp) self = _pthread_self (); if (mtxp->__owner_id == NOTRECOVERABLE_ID) ; /* Nothing to do. */ - else if (mtxp->__owner_id != self->thread || - (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ()) + else if (mtxp->__owner_id != self->thread + || (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ()) ret = EPERM; else if (--mtxp->__cnt == 0) { /* Release the lock. If it's in an inconsistent * state, mark it as irrecoverable. */ - mtxp->__owner_id = (mtxp->__lock & LLL_DEAD_OWNER) ? - NOTRECOVERABLE_ID : 0; + mtxp->__owner_id = ((mtxp->__lock & LLL_DEAD_OWNER) + ? NOTRECOVERABLE_ID : 0); __lll_robust_unlock (&mtxp->__lock, flags); } diff --git a/sysdeps/mach/hurd/htl/pt-mutex.h b/sysdeps/mach/hurd/htl/pt-mutex.h index 26b6f8199f..820dc0e5d0 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex.h +++ b/sysdeps/mach/hurd/htl/pt-mutex.h @@ -27,8 +27,8 @@ #define ROBUST_LOCK(self, mtxp, cb, ...) \ if (mtxp->__owner_id == NOTRECOVERABLE_ID) \ return ENOTRECOVERABLE; \ - else if (mtxp->__owner_id == self->thread && \ - __getpid () == (int)(mtxp->__lock & LLL_OWNER_MASK)) \ + else if (mtxp->__owner_id == self->thread \ + && __getpid () == (int)(mtxp->__lock & LLL_OWNER_MASK)) \ { \ if (mtxp->__type == PT_MTX_RECURSIVE) \ { \ @@ -63,9 +63,9 @@ /* Check that a thread owns the mutex. For non-robust, task-shared * objects, we have to check the thread *and* process-id. */ #define mtx_owned_p(mtx, pt, flags) \ - ((mtx)->__owner_id == (pt)->thread && \ - (((flags) & GSYNC_SHARED) == 0 || \ - (mtx)->__shpid == __getpid ())) + ((mtx)->__owner_id == (pt)->thread \ + && (((flags) & GSYNC_SHARED) == 0 \ + || (mtx)->__shpid == __getpid ())) /* Record a thread as the owner of the mutex. */ #define mtx_set_owner(mtx, pt, flags) \ diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c b/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c index ee5986f213..590d9b5118 100644 --- a/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c +++ b/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c @@ -26,8 +26,8 @@ int pthread_mutexattr_getrobust (const pthread_mutexattr_t *attrp, int *outp) { - *outp = (attrp->__prioceiling & PTHREAD_MUTEX_ROBUST) ? - PTHREAD_MUTEX_ROBUST : PTHREAD_MUTEX_STALLED; + *outp = ((attrp->__prioceiling & PTHREAD_MUTEX_ROBUST) + ? PTHREAD_MUTEX_ROBUST : PTHREAD_MUTEX_STALLED); return 0; } |