mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
43
ChangeLog
43
ChangeLog
@ -1,5 +1,48 @@
|
|||||||
2019-02-26 Joseph Myers <joseph@codesourcery.com>
|
2019-02-26 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
* sysdeps/i386/dl-machine.h (elf_machine_rela): Add fall-through
|
* sysdeps/i386/dl-machine.h (elf_machine_rela): Add fall-through
|
||||||
comments.
|
comments.
|
||||||
* sysdeps/m68k/m680x0/fpu/s_cexp_template.c (s(__cexp)): Likewise.
|
* sysdeps/m68k/m680x0/fpu/s_cexp_template.c (s(__cexp)): Likewise.
|
||||||
|
@ -295,8 +295,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Pointer mangling support. */
|
/* Pointer mangling support. */
|
||||||
#if (IS_IN (rtld) || \
|
#if (IS_IN (rtld) \
|
||||||
(!defined SHARED && (IS_IN (libc) || IS_IN (libpthread))))
|
|| (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread))))
|
||||||
# ifdef __ASSEMBLER__
|
# ifdef __ASSEMBLER__
|
||||||
# define PTR_MANGLE_LOAD(guard, tmp) \
|
# define PTR_MANGLE_LOAD(guard, tmp) \
|
||||||
LDR_HIDDEN (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local), 0)
|
LDR_HIDDEN (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local), 0)
|
||||||
|
@ -271,11 +271,11 @@ __fork (void)
|
|||||||
port,
|
port,
|
||||||
MACH_MSG_TYPE_MOVE_SEND))
|
MACH_MSG_TYPE_MOVE_SEND))
|
||||||
LOSE;
|
LOSE;
|
||||||
if (refs > 1 &&
|
if (refs > 1
|
||||||
(err = __mach_port_mod_refs (newtask,
|
&& (err = __mach_port_mod_refs (newtask,
|
||||||
portnames[i],
|
portnames[i],
|
||||||
MACH_PORT_RIGHT_SEND,
|
MACH_PORT_RIGHT_SEND,
|
||||||
refs - 1)))
|
refs - 1)))
|
||||||
LOSE;
|
LOSE;
|
||||||
}
|
}
|
||||||
if (porttypes[i] & MACH_PORT_TYPE_SEND_ONCE)
|
if (porttypes[i] & MACH_PORT_TYPE_SEND_ONCE)
|
||||||
@ -297,8 +297,8 @@ __fork (void)
|
|||||||
LOSE;
|
LOSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (porttypes[i] &
|
else if (porttypes[i]
|
||||||
(MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_DEAD_NAME))
|
& (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_DEAD_NAME))
|
||||||
{
|
{
|
||||||
/* This is a send right or a dead name.
|
/* This is a send right or a dead name.
|
||||||
Give the child as many references for it as we have. */
|
Give the child as many references for it as we have. */
|
||||||
@ -367,8 +367,8 @@ __fork (void)
|
|||||||
LOSE;
|
LOSE;
|
||||||
if (insert == MACH_PORT_NULL)
|
if (insert == MACH_PORT_NULL)
|
||||||
continue;
|
continue;
|
||||||
if (insert == portnames[i] &&
|
if (insert == portnames[i]
|
||||||
(porttypes[i] & MACH_PORT_TYPE_DEAD_NAME))
|
&& (porttypes[i] & MACH_PORT_TYPE_DEAD_NAME))
|
||||||
/* This is a dead name; allocate another dead name
|
/* This is a dead name; allocate another dead name
|
||||||
with the same name in the child. */
|
with the same name in the child. */
|
||||||
allocate_dead_name:
|
allocate_dead_name:
|
||||||
@ -393,10 +393,10 @@ __fork (void)
|
|||||||
assert (__mach_port_extract_right (newtask, portnames[i],
|
assert (__mach_port_extract_right (newtask, portnames[i],
|
||||||
MACH_MSG_TYPE_COPY_SEND,
|
MACH_MSG_TYPE_COPY_SEND,
|
||||||
&childport,
|
&childport,
|
||||||
&poly) == 0 &&
|
&poly) == 0
|
||||||
childport == insert &&
|
&& childport == insert
|
||||||
__mach_port_deallocate (__mach_task_self (),
|
&& __mach_port_deallocate (__mach_task_self (),
|
||||||
childport) == 0);
|
childport) == 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -411,11 +411,11 @@ __fork (void)
|
|||||||
|
|
||||||
case KERN_SUCCESS:
|
case KERN_SUCCESS:
|
||||||
/* Give the child as many user references as we have. */
|
/* Give the child as many user references as we have. */
|
||||||
if (refs > 1 &&
|
if (refs > 1
|
||||||
(err = __mach_port_mod_refs (newtask,
|
&& (err = __mach_port_mod_refs (newtask,
|
||||||
portnames[i],
|
portnames[i],
|
||||||
MACH_PORT_RIGHT_SEND,
|
MACH_PORT_RIGHT_SEND,
|
||||||
refs - 1)))
|
refs - 1)))
|
||||||
LOSE;
|
LOSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -432,33 +432,35 @@ __fork (void)
|
|||||||
resume_threads ();
|
resume_threads ();
|
||||||
|
|
||||||
/* Create the child main user thread and signal thread. */
|
/* Create the child main user thread and signal thread. */
|
||||||
if ((err = __thread_create (newtask, &thread)) ||
|
if ((err = __thread_create (newtask, &thread))
|
||||||
(err = __thread_create (newtask, &sigthread)))
|
|| (err = __thread_create (newtask, &sigthread)))
|
||||||
LOSE;
|
LOSE;
|
||||||
|
|
||||||
/* Insert send rights for those threads. We previously allocated
|
/* Insert send rights for those threads. We previously allocated
|
||||||
dead name rights with the names we want to give the thread ports
|
dead name rights with the names we want to give the thread ports
|
||||||
in the child as placeholders. Now deallocate them so we can use
|
in the child as placeholders. Now deallocate them so we can use
|
||||||
the names. */
|
the names. */
|
||||||
if ((err = __mach_port_deallocate (newtask, ss->thread)) ||
|
if ((err = __mach_port_deallocate (newtask, ss->thread))
|
||||||
(err = __mach_port_insert_right (newtask, ss->thread,
|
|| (err = __mach_port_insert_right (newtask, ss->thread,
|
||||||
thread, MACH_MSG_TYPE_COPY_SEND)))
|
thread,
|
||||||
|
MACH_MSG_TYPE_COPY_SEND)))
|
||||||
LOSE;
|
LOSE;
|
||||||
if (thread_refs > 1 &&
|
if (thread_refs > 1
|
||||||
(err = __mach_port_mod_refs (newtask, ss->thread,
|
&& (err = __mach_port_mod_refs (newtask, ss->thread,
|
||||||
MACH_PORT_RIGHT_SEND,
|
MACH_PORT_RIGHT_SEND,
|
||||||
thread_refs - 1)))
|
thread_refs - 1)))
|
||||||
LOSE;
|
LOSE;
|
||||||
if ((_hurd_msgport_thread != MACH_PORT_NULL) /* Let user have none. */
|
if ((_hurd_msgport_thread != MACH_PORT_NULL) /* Let user have none. */
|
||||||
&& ((err = __mach_port_deallocate (newtask, _hurd_msgport_thread)) ||
|
&& ((err = __mach_port_deallocate (newtask, _hurd_msgport_thread))
|
||||||
(err = __mach_port_insert_right (newtask, _hurd_msgport_thread,
|
|| (err = __mach_port_insert_right (newtask,
|
||||||
sigthread,
|
_hurd_msgport_thread,
|
||||||
MACH_MSG_TYPE_COPY_SEND))))
|
sigthread,
|
||||||
|
MACH_MSG_TYPE_COPY_SEND))))
|
||||||
LOSE;
|
LOSE;
|
||||||
if (sigthread_refs > 1 &&
|
if (sigthread_refs > 1
|
||||||
(err = __mach_port_mod_refs (newtask, _hurd_msgport_thread,
|
&& (err = __mach_port_mod_refs (newtask, _hurd_msgport_thread,
|
||||||
MACH_PORT_RIGHT_SEND,
|
MACH_PORT_RIGHT_SEND,
|
||||||
sigthread_refs - 1)))
|
sigthread_refs - 1)))
|
||||||
LOSE;
|
LOSE;
|
||||||
|
|
||||||
/* This seems like a convenient juncture to copy the proc server's
|
/* This seems like a convenient juncture to copy the proc server's
|
||||||
|
@ -148,8 +148,8 @@ __hurd_canonicalize_directory_name_internal (file_t thisdir,
|
|||||||
dirdata = dirbuf;
|
dirdata = dirbuf;
|
||||||
dirdatasize = dirbufsize;
|
dirdatasize = dirbufsize;
|
||||||
while (!(err = __dir_readdir (parent, &dirdata, &dirdatasize,
|
while (!(err = __dir_readdir (parent, &dirdata, &dirdatasize,
|
||||||
direntry, -1, 0, &nentries)) &&
|
direntry, -1, 0, &nentries))
|
||||||
nentries != 0)
|
&& nentries != 0)
|
||||||
{
|
{
|
||||||
/* We have a block of directory entries. */
|
/* We have a block of directory entries. */
|
||||||
|
|
||||||
@ -178,9 +178,9 @@ __hurd_canonicalize_directory_name_internal (file_t thisdir,
|
|||||||
offset += d->d_reclen;
|
offset += d->d_reclen;
|
||||||
|
|
||||||
/* Ignore `.' and `..'. */
|
/* Ignore `.' and `..'. */
|
||||||
if (d->d_name[0] == '.' &&
|
if (d->d_name[0] == '.'
|
||||||
(d->d_namlen == 1 ||
|
&& (d->d_namlen == 1
|
||||||
(d->d_namlen == 2 && d->d_name[1] == '.')))
|
|| (d->d_namlen == 2 && d->d_name[1] == '.')))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (mount_point || d->d_ino == thisino)
|
if (mount_point || d->d_ino == thisino)
|
||||||
|
@ -29,11 +29,11 @@ pthread_mutex_consistent (pthread_mutex_t *mtxp)
|
|||||||
int ret = EINVAL;
|
int ret = EINVAL;
|
||||||
unsigned int val = mtxp->__lock;
|
unsigned int val = mtxp->__lock;
|
||||||
|
|
||||||
if ((mtxp->__flags & PTHREAD_MUTEX_ROBUST) != 0 &&
|
if ((mtxp->__flags & PTHREAD_MUTEX_ROBUST) != 0
|
||||||
(val & LLL_DEAD_OWNER) != 0 &&
|
&& (val & LLL_DEAD_OWNER) != 0
|
||||||
atomic_compare_and_exchange_bool_acq (&mtxp->__lock,
|
&& atomic_compare_and_exchange_bool_acq (&mtxp->__lock,
|
||||||
__getpid () | LLL_WAITERS,
|
__getpid () | LLL_WAITERS,
|
||||||
val) == 0)
|
val) == 0)
|
||||||
{
|
{
|
||||||
/* The mutex is now ours, and it's consistent. */
|
/* The mutex is now ours, and it's consistent. */
|
||||||
mtxp->__owner_id = _pthread_self ()->thread;
|
mtxp->__owner_id = _pthread_self ()->thread;
|
||||||
|
@ -37,13 +37,13 @@ _pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp)
|
|||||||
if (attrp == NULL)
|
if (attrp == NULL)
|
||||||
attrp = &dfl_attr;
|
attrp = &dfl_attr;
|
||||||
|
|
||||||
mtxp->__flags = (attrp->__pshared == PTHREAD_PROCESS_SHARED ?
|
mtxp->__flags = (attrp->__pshared == PTHREAD_PROCESS_SHARED
|
||||||
GSYNC_SHARED : 0) | ((attrp->
|
? GSYNC_SHARED : 0) | ((attrp->__prioceiling
|
||||||
__prioceiling & PTHREAD_MUTEX_ROBUST) ?
|
& PTHREAD_MUTEX_ROBUST)
|
||||||
PTHREAD_MUTEX_ROBUST : 0);
|
? PTHREAD_MUTEX_ROBUST : 0);
|
||||||
|
|
||||||
mtxp->__type = attrp->__mutex_type +
|
mtxp->__type = (attrp->__mutex_type
|
||||||
(attrp->__mutex_type != __PTHREAD_MUTEX_TIMED);
|
+ (attrp->__mutex_type != __PTHREAD_MUTEX_TIMED));
|
||||||
|
|
||||||
mtxp->__owner_id = 0;
|
mtxp->__owner_id = 0;
|
||||||
mtxp->__shpid = 0;
|
mtxp->__shpid = 0;
|
||||||
|
@ -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
|
/* Note that this can be used to transfer an inconsistent
|
||||||
* mutex as well. The new owner will still have the same
|
* mutex as well. The new owner will still have the same
|
||||||
* flags as the original. */
|
* flags as the original. */
|
||||||
if (mtxp->__owner_id != self->thread ||
|
if (mtxp->__owner_id != self->thread
|
||||||
(int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ())
|
|| (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ())
|
||||||
ret = EPERM;
|
ret = EPERM;
|
||||||
else
|
else
|
||||||
mtxp->__owner_id = pt->thread;
|
mtxp->__owner_id = pt->thread;
|
||||||
|
@ -65,15 +65,15 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp)
|
|||||||
self = _pthread_self ();
|
self = _pthread_self ();
|
||||||
if (mtxp->__owner_id == NOTRECOVERABLE_ID)
|
if (mtxp->__owner_id == NOTRECOVERABLE_ID)
|
||||||
; /* Nothing to do. */
|
; /* Nothing to do. */
|
||||||
else if (mtxp->__owner_id != self->thread ||
|
else if (mtxp->__owner_id != self->thread
|
||||||
(int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ())
|
|| (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ())
|
||||||
ret = EPERM;
|
ret = EPERM;
|
||||||
else if (--mtxp->__cnt == 0)
|
else if (--mtxp->__cnt == 0)
|
||||||
{
|
{
|
||||||
/* Release the lock. If it's in an inconsistent
|
/* Release the lock. If it's in an inconsistent
|
||||||
* state, mark it as irrecoverable. */
|
* state, mark it as irrecoverable. */
|
||||||
mtxp->__owner_id = (mtxp->__lock & LLL_DEAD_OWNER) ?
|
mtxp->__owner_id = ((mtxp->__lock & LLL_DEAD_OWNER)
|
||||||
NOTRECOVERABLE_ID : 0;
|
? NOTRECOVERABLE_ID : 0);
|
||||||
__lll_robust_unlock (&mtxp->__lock, flags);
|
__lll_robust_unlock (&mtxp->__lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
#define ROBUST_LOCK(self, mtxp, cb, ...) \
|
#define ROBUST_LOCK(self, mtxp, cb, ...) \
|
||||||
if (mtxp->__owner_id == NOTRECOVERABLE_ID) \
|
if (mtxp->__owner_id == NOTRECOVERABLE_ID) \
|
||||||
return ENOTRECOVERABLE; \
|
return ENOTRECOVERABLE; \
|
||||||
else if (mtxp->__owner_id == self->thread && \
|
else if (mtxp->__owner_id == self->thread \
|
||||||
__getpid () == (int)(mtxp->__lock & LLL_OWNER_MASK)) \
|
&& __getpid () == (int)(mtxp->__lock & LLL_OWNER_MASK)) \
|
||||||
{ \
|
{ \
|
||||||
if (mtxp->__type == PT_MTX_RECURSIVE) \
|
if (mtxp->__type == PT_MTX_RECURSIVE) \
|
||||||
{ \
|
{ \
|
||||||
@ -63,9 +63,9 @@
|
|||||||
/* Check that a thread owns the mutex. For non-robust, task-shared
|
/* Check that a thread owns the mutex. For non-robust, task-shared
|
||||||
* objects, we have to check the thread *and* process-id. */
|
* objects, we have to check the thread *and* process-id. */
|
||||||
#define mtx_owned_p(mtx, pt, flags) \
|
#define mtx_owned_p(mtx, pt, flags) \
|
||||||
((mtx)->__owner_id == (pt)->thread && \
|
((mtx)->__owner_id == (pt)->thread \
|
||||||
(((flags) & GSYNC_SHARED) == 0 || \
|
&& (((flags) & GSYNC_SHARED) == 0 \
|
||||||
(mtx)->__shpid == __getpid ()))
|
|| (mtx)->__shpid == __getpid ()))
|
||||||
|
|
||||||
/* Record a thread as the owner of the mutex. */
|
/* Record a thread as the owner of the mutex. */
|
||||||
#define mtx_set_owner(mtx, pt, flags) \
|
#define mtx_set_owner(mtx, pt, flags) \
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
int
|
int
|
||||||
pthread_mutexattr_getrobust (const pthread_mutexattr_t *attrp, int *outp)
|
pthread_mutexattr_getrobust (const pthread_mutexattr_t *attrp, int *outp)
|
||||||
{
|
{
|
||||||
*outp = (attrp->__prioceiling & PTHREAD_MUTEX_ROBUST) ?
|
*outp = ((attrp->__prioceiling & PTHREAD_MUTEX_ROBUST)
|
||||||
PTHREAD_MUTEX_ROBUST : PTHREAD_MUTEX_STALLED;
|
? PTHREAD_MUTEX_ROBUST : PTHREAD_MUTEX_STALLED);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,8 +126,8 @@ init1 (int argc, char *arg0, ...)
|
|||||||
char dummy;
|
char dummy;
|
||||||
const vm_address_t newsp = (vm_address_t) &dummy;
|
const vm_address_t newsp = (vm_address_t) &dummy;
|
||||||
|
|
||||||
if (d->stack_size != 0 && (newsp < d->stack_base ||
|
if (d->stack_size != 0 && (newsp < d->stack_base
|
||||||
newsp - d->stack_base > d->stack_size))
|
|| newsp - d->stack_base > d->stack_size))
|
||||||
/* The new stack pointer does not intersect with the
|
/* The new stack pointer does not intersect with the
|
||||||
stack the exec server set up for us, so free that stack. */
|
stack the exec server set up for us, so free that stack. */
|
||||||
__vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size);
|
__vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size);
|
||||||
|
@ -74,8 +74,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
|
|||||||
interrupted RPC frame. */
|
interrupted RPC frame. */
|
||||||
state->basic.esp = state->basic.uesp;
|
state->basic.esp = state->basic.uesp;
|
||||||
|
|
||||||
if ((ss->actions[signo].sa_flags & SA_ONSTACK) &&
|
if ((ss->actions[signo].sa_flags & SA_ONSTACK)
|
||||||
!(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
|
&& !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
|
||||||
{
|
{
|
||||||
sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
|
sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
|
||||||
ss->sigaltstack.ss_flags |= SS_ONSTACK;
|
ss->sigaltstack.ss_flags |= SS_ONSTACK;
|
||||||
@ -91,8 +91,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
|
|||||||
We must check for the window during which %esp points at the
|
We must check for the window during which %esp points at the
|
||||||
mach_msg arguments. The space below until %ecx is used by
|
mach_msg arguments. The space below until %ecx is used by
|
||||||
the _hurd_intr_rpc_mach_msg frame, and must not be clobbered. */
|
the _hurd_intr_rpc_mach_msg frame, and must not be clobbered. */
|
||||||
else if (state->basic.eip >= (int) &_hurd_intr_rpc_msg_cx_sp &&
|
else if (state->basic.eip >= (int) &_hurd_intr_rpc_msg_cx_sp
|
||||||
state->basic.eip < (int) &_hurd_intr_rpc_msg_sp_restored)
|
&& state->basic.eip < (int) &_hurd_intr_rpc_msg_sp_restored)
|
||||||
/* The SP now points at the mach_msg args, but there is more stack
|
/* The SP now points at the mach_msg args, but there is more stack
|
||||||
space used below it. The real SP is saved in %ecx; we must push the
|
space used below it. The real SP is saved in %ecx; we must push the
|
||||||
new frame below there, and restore that value as the SP on
|
new frame below there, and restore that value as the SP on
|
||||||
|
@ -66,15 +66,15 @@ __ioctl (int fd, unsigned long int request, ...)
|
|||||||
kern_return_t RetCode;
|
kern_return_t RetCode;
|
||||||
} header_typecheck;
|
} header_typecheck;
|
||||||
};
|
};
|
||||||
char data[3 * sizeof (mach_msg_type_t) +
|
char data[3 * sizeof (mach_msg_type_t)
|
||||||
msg_align (_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type))) +
|
+ msg_align (_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type)))
|
||||||
msg_align (_IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type))) +
|
+ msg_align (_IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type)))
|
||||||
_IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))];
|
+ _IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))];
|
||||||
#else /* Untyped Mach IPC format. */
|
#else /* Untyped Mach IPC format. */
|
||||||
mig_reply_error_t header;
|
mig_reply_error_t header;
|
||||||
char data[_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type)) +
|
char data[_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type))
|
||||||
_IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type)) +
|
+ _IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type))
|
||||||
_IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))];
|
+ _IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))];
|
||||||
mach_msg_trailer_t trailer;
|
mach_msg_trailer_t trailer;
|
||||||
#endif
|
#endif
|
||||||
} msg;
|
} msg;
|
||||||
@ -192,11 +192,11 @@ __ioctl (int fd, unsigned long int request, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m->msgh_id != msgid + 100)
|
if (m->msgh_id != msgid + 100)
|
||||||
return (m->msgh_id == MACH_NOTIFY_SEND_ONCE ?
|
return (m->msgh_id == MACH_NOTIFY_SEND_ONCE
|
||||||
MIG_SERVER_DIED : MIG_REPLY_MISMATCH);
|
? MIG_SERVER_DIED : MIG_REPLY_MISMATCH);
|
||||||
|
|
||||||
if (m->msgh_size != reply_size &&
|
if (m->msgh_size != reply_size
|
||||||
m->msgh_size != sizeof msg.header)
|
&& m->msgh_size != sizeof msg.header)
|
||||||
return MIG_TYPE_ERROR;
|
return MIG_TYPE_ERROR;
|
||||||
|
|
||||||
#ifdef MACH_MSG_TYPE_BIT
|
#ifdef MACH_MSG_TYPE_BIT
|
||||||
@ -307,11 +307,11 @@ __ioctl (int fd, unsigned long int request, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
if (m->msgh_size != reply_size ||
|
if (m->msgh_size != reply_size
|
||||||
((_IOC_INOUT (request) & IOC_OUT) &&
|
|| ((_IOC_INOUT (request) & IOC_OUT)
|
||||||
(out (_IOT_COUNT0 (type), _IOT_TYPE0 (type), arg, &arg) ||
|
&& (out (_IOT_COUNT0 (type), _IOT_TYPE0 (type), arg, &arg)
|
||||||
out (_IOT_COUNT1 (type), _IOT_TYPE1 (type), arg, &arg) ||
|
|| out (_IOT_COUNT1 (type), _IOT_TYPE1 (type), arg, &arg)
|
||||||
out (_IOT_COUNT2 (type), _IOT_TYPE2 (type), arg, &arg))))
|
|| out (_IOT_COUNT2 (type), _IOT_TYPE2 (type), arg, &arg))))
|
||||||
return __hurd_fail (MIG_TYPE_ERROR);
|
return __hurd_fail (MIG_TYPE_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ _longjmp_unwind (jmp_buf env, int val)
|
|||||||
__spin_lock (&ss->critical_section_lock);
|
__spin_lock (&ss->critical_section_lock);
|
||||||
|
|
||||||
/* Remove local signal preemptors being unwound past. */
|
/* Remove local signal preemptors being unwound past. */
|
||||||
while (ss->preemptors &&
|
while (ss->preemptors
|
||||||
_JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors, demangle_ptr))
|
&& _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors, demangle_ptr))
|
||||||
ss->preemptors = ss->preemptors->next;
|
ss->preemptors = ss->preemptors->next;
|
||||||
|
|
||||||
__spin_unlock (&ss->lock);
|
__spin_unlock (&ss->lock);
|
||||||
|
@ -55,8 +55,8 @@ __kill (pid_t pid, int sig)
|
|||||||
err = __task_terminate (refport);
|
err = __task_terminate (refport);
|
||||||
__mach_port_deallocate (__mach_task_self (), refport);
|
__mach_port_deallocate (__mach_task_self (), refport);
|
||||||
}
|
}
|
||||||
} while (err == MACH_SEND_INVALID_DEST ||
|
} while (err == MACH_SEND_INVALID_DEST
|
||||||
err == MIG_SERVER_DIED);
|
|| err == MIG_SERVER_DIED);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
error_t taskerr;
|
error_t taskerr;
|
||||||
@ -103,8 +103,8 @@ __kill (pid_t pid, int sig)
|
|||||||
}
|
}
|
||||||
err = HURD_MSGPORT_RPC (__proc_getmsgport (proc, pid, &msgport),
|
err = HURD_MSGPORT_RPC (__proc_getmsgport (proc, pid, &msgport),
|
||||||
(taskerr = __proc_pid2task (proc, pid,
|
(taskerr = __proc_pid2task (proc, pid,
|
||||||
&refport)) ?
|
&refport))
|
||||||
__proc_getsidport (proc, &refport) : 0, 1,
|
? __proc_getsidport (proc, &refport) : 0, 1,
|
||||||
kill_port (msgport, refport));
|
kill_port (msgport, refport));
|
||||||
}
|
}
|
||||||
if (! err)
|
if (! err)
|
||||||
|
@ -27,9 +27,9 @@ mach_port_t __hurd_reply_port0;
|
|||||||
mach_port_t
|
mach_port_t
|
||||||
__mig_get_reply_port (void)
|
__mig_get_reply_port (void)
|
||||||
{
|
{
|
||||||
if (__hurd_local_reply_port == MACH_PORT_NULL ||
|
if (__hurd_local_reply_port == MACH_PORT_NULL
|
||||||
(&__hurd_local_reply_port != &__hurd_reply_port0
|
|| (&__hurd_local_reply_port != &__hurd_reply_port0
|
||||||
&& __hurd_local_reply_port == __hurd_reply_port0))
|
&& __hurd_local_reply_port == __hurd_reply_port0))
|
||||||
__hurd_local_reply_port = __mach_reply_port ();
|
__hurd_local_reply_port = __mach_reply_port ();
|
||||||
|
|
||||||
return __hurd_local_reply_port;
|
return __hurd_local_reply_port;
|
||||||
|
@ -349,8 +349,8 @@ ptrace (enum __ptrace_request request, ... )
|
|||||||
task_t task = __pid2task (pid);
|
task_t task = __pid2task (pid);
|
||||||
if (task == MACH_PORT_NULL)
|
if (task == MACH_PORT_NULL)
|
||||||
return -1;
|
return -1;
|
||||||
if ((vm_address_t) addr % __vm_page_size == 0 &&
|
if ((vm_address_t) addr % __vm_page_size == 0
|
||||||
(vm_address_t) data % __vm_page_size == 0)
|
&& (vm_address_t) data % __vm_page_size == 0)
|
||||||
{
|
{
|
||||||
/* Writing whole pages; can go directly from the user's buffer. */
|
/* Writing whole pages; can go directly from the user's buffer. */
|
||||||
ourpage = (vm_address_t) addr2;
|
ourpage = (vm_address_t) addr2;
|
||||||
|
@ -547,66 +547,66 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
|||||||
break;
|
break;
|
||||||
case R_SPARC_WDISP30:
|
case R_SPARC_WDISP30:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & 0xc0000000) |
|
((*(unsigned int *)reloc_addr & 0xc0000000)
|
||||||
(((value - (Elf64_Addr) reloc_addr) >> 2) & 0x3fffffff));
|
| (((value - (Elf64_Addr) reloc_addr) >> 2) & 0x3fffffff));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* MEDLOW code model relocs */
|
/* MEDLOW code model relocs */
|
||||||
case R_SPARC_LO10:
|
case R_SPARC_LO10:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & ~0x3ff) |
|
((*(unsigned int *)reloc_addr & ~0x3ff)
|
||||||
(value & 0x3ff));
|
| (value & 0x3ff));
|
||||||
break;
|
break;
|
||||||
case R_SPARC_HI22:
|
case R_SPARC_HI22:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & 0xffc00000) |
|
((*(unsigned int *)reloc_addr & 0xffc00000)
|
||||||
((value >> 10) & 0x3fffff));
|
| ((value >> 10) & 0x3fffff));
|
||||||
break;
|
break;
|
||||||
case R_SPARC_OLO10:
|
case R_SPARC_OLO10:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & ~0x1fff) |
|
((*(unsigned int *)reloc_addr & ~0x1fff)
|
||||||
(((value & 0x3ff) + ELF64_R_TYPE_DATA (reloc->r_info)) & 0x1fff));
|
| (((value & 0x3ff) + ELF64_R_TYPE_DATA (reloc->r_info)) & 0x1fff));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* ABS34 code model reloc */
|
/* ABS34 code model reloc */
|
||||||
case R_SPARC_H34:
|
case R_SPARC_H34:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & 0xffc00000) |
|
((*(unsigned int *)reloc_addr & 0xffc00000)
|
||||||
((value >> 12) & 0x3fffff));
|
| ((value >> 12) & 0x3fffff));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* MEDMID code model relocs */
|
/* MEDMID code model relocs */
|
||||||
case R_SPARC_H44:
|
case R_SPARC_H44:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & 0xffc00000) |
|
((*(unsigned int *)reloc_addr & 0xffc00000)
|
||||||
((value >> 22) & 0x3fffff));
|
| ((value >> 22) & 0x3fffff));
|
||||||
break;
|
break;
|
||||||
case R_SPARC_M44:
|
case R_SPARC_M44:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & ~0x3ff) |
|
((*(unsigned int *)reloc_addr & ~0x3ff)
|
||||||
((value >> 12) & 0x3ff));
|
| ((value >> 12) & 0x3ff));
|
||||||
break;
|
break;
|
||||||
case R_SPARC_L44:
|
case R_SPARC_L44:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & ~0xfff) |
|
((*(unsigned int *)reloc_addr & ~0xfff)
|
||||||
(value & 0xfff));
|
| (value & 0xfff));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* MEDANY code model relocs */
|
/* MEDANY code model relocs */
|
||||||
case R_SPARC_HH22:
|
case R_SPARC_HH22:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & 0xffc00000) |
|
((*(unsigned int *)reloc_addr & 0xffc00000)
|
||||||
(value >> 42));
|
| (value >> 42));
|
||||||
break;
|
break;
|
||||||
case R_SPARC_HM10:
|
case R_SPARC_HM10:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & ~0x3ff) |
|
((*(unsigned int *)reloc_addr & ~0x3ff)
|
||||||
((value >> 32) & 0x3ff));
|
| ((value >> 32) & 0x3ff));
|
||||||
break;
|
break;
|
||||||
case R_SPARC_LM22:
|
case R_SPARC_LM22:
|
||||||
*(unsigned int *) reloc_addr =
|
*(unsigned int *) reloc_addr =
|
||||||
((*(unsigned int *)reloc_addr & 0xffc00000) |
|
((*(unsigned int *)reloc_addr & 0xffc00000)
|
||||||
((value >> 10) & 0x003fffff));
|
| ((value >> 10) & 0x003fffff));
|
||||||
break;
|
break;
|
||||||
case R_SPARC_UA16:
|
case R_SPARC_UA16:
|
||||||
((unsigned char *) reloc_addr_arg) [0] = value >> 8;
|
((unsigned char *) reloc_addr_arg) [0] = value >> 8;
|
||||||
|
@ -255,9 +255,9 @@
|
|||||||
#endif /* __ASSEMBLER__ */
|
#endif /* __ASSEMBLER__ */
|
||||||
|
|
||||||
/* Pointer mangling is supported for AArch64. */
|
/* Pointer mangling is supported for AArch64. */
|
||||||
#if (IS_IN (rtld) || \
|
#if (IS_IN (rtld) \
|
||||||
(!defined SHARED && (IS_IN (libc) \
|
|| (!defined SHARED && (IS_IN (libc) \
|
||||||
|| IS_IN (libpthread))))
|
|| IS_IN (libpthread))))
|
||||||
# ifdef __ASSEMBLER__
|
# ifdef __ASSEMBLER__
|
||||||
/* Note, dst, src, guard, and tmp are all register numbers rather than
|
/* Note, dst, src, guard, and tmp are all register numbers rather than
|
||||||
register names so they will work with both ILP32 and LP64. */
|
register names so they will work with both ILP32 and LP64. */
|
||||||
|
@ -506,14 +506,15 @@ process_cpuinfo(struct cpuinfo_data *data)
|
|||||||
{
|
{
|
||||||
if (fgets_unlocked (dummy, 256, fp) == NULL)
|
if (fgets_unlocked (dummy, 256, fp) == NULL)
|
||||||
break;
|
break;
|
||||||
if (!got_type &&
|
if (!got_type
|
||||||
sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1)
|
&& sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1)
|
||||||
got_type = 1;
|
got_type = 1;
|
||||||
if (!got_vari &&
|
if (!got_vari
|
||||||
sscanf (dummy, "system variation : %256[^\n]\n", data->sysvari) == 1)
|
&& (sscanf (dummy, "system variation : %256[^\n]\n", data->sysvari)
|
||||||
|
== 1))
|
||||||
got_vari = 1;
|
got_vari = 1;
|
||||||
if (!got_model &&
|
if (!got_model
|
||||||
sscanf (dummy, "cpu model : %256[^\n]\n", data->cpumodel) == 1)
|
&& sscanf (dummy, "cpu model : %256[^\n]\n", data->cpumodel) == 1)
|
||||||
got_model = 1;
|
got_model = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ struct timex
|
|||||||
#define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */
|
#define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */
|
||||||
|
|
||||||
/* Read-only bits */
|
/* Read-only bits */
|
||||||
#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
|
#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER \
|
||||||
STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
|
| STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
|
||||||
|
|
||||||
#endif /* bits/timex.h */
|
#endif /* bits/timex.h */
|
||||||
|
@ -486,8 +486,8 @@ __local_syscall_error: \
|
|||||||
#endif /* __ASSEMBLER__ */
|
#endif /* __ASSEMBLER__ */
|
||||||
|
|
||||||
/* Pointer mangling support. */
|
/* Pointer mangling support. */
|
||||||
#if (IS_IN (rtld) || \
|
#if (IS_IN (rtld) \
|
||||||
(!defined SHARED && (IS_IN (libc) || IS_IN (libpthread))))
|
|| (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread))))
|
||||||
# ifdef __ASSEMBLER__
|
# ifdef __ASSEMBLER__
|
||||||
# define PTR_MANGLE(dst, src, guard) \
|
# define PTR_MANGLE(dst, src, guard) \
|
||||||
grs t0, 1f; \
|
grs t0, 1f; \
|
||||||
|
@ -49,8 +49,8 @@ void ____longjmp_chk (__jmp_buf env, int val)
|
|||||||
|
|
||||||
/* If we we are executing on the alternate stack and within the
|
/* If we we are executing on the alternate stack and within the
|
||||||
bounds, do the longjmp. */
|
bounds, do the longjmp. */
|
||||||
if (ss.ss_flags == SS_ONSTACK &&
|
if (ss.ss_flags == SS_ONSTACK
|
||||||
(this_frame >= ss.ss_sp && this_frame < (ss.ss_sp + ss.ss_size)))
|
&& (this_frame >= ss.ss_sp && this_frame < (ss.ss_sp + ss.ss_size)))
|
||||||
__longjmp (env, val);
|
__longjmp (env, val);
|
||||||
|
|
||||||
__fortify_fail ("longjmp causes uninitialized stack frame");
|
__fortify_fail ("longjmp causes uninitialized stack frame");
|
||||||
|
@ -37,8 +37,8 @@ futimesat (int fd, const char *file, const struct timeval tvp[2])
|
|||||||
|
|
||||||
if (tvp)
|
if (tvp)
|
||||||
{
|
{
|
||||||
if (tvp[0].tv_usec >= 1000000 || tvp[0].tv_usec < 0 ||
|
if (tvp[0].tv_usec >= 1000000 || tvp[0].tv_usec < 0
|
||||||
tvp[1].tv_usec >= 1000000 || tvp[1].tv_usec < 0)
|
|| tvp[1].tv_usec >= 1000000 || tvp[1].tv_usec < 0)
|
||||||
{
|
{
|
||||||
__set_errno (EINVAL);
|
__set_errno (EINVAL);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -233,9 +233,9 @@
|
|||||||
|
|
||||||
#undef INTERNAL_SYSCALL
|
#undef INTERNAL_SYSCALL
|
||||||
#define INTERNAL_SYSCALL(name, err, nr, args...) \
|
#define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||||
(((__NR_##name) < 256) ? \
|
(((__NR_##name) < 256) \
|
||||||
INTERNAL_SYSCALL_DIRECT(name, err, nr, args) : \
|
? INTERNAL_SYSCALL_DIRECT(name, err, nr, args) \
|
||||||
INTERNAL_SYSCALL_SVC0(name, err,nr, args))
|
: INTERNAL_SYSCALL_SVC0(name, err,nr, args))
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_ERROR_P
|
#undef INTERNAL_SYSCALL_ERROR_P
|
||||||
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||||
|
@ -239,9 +239,9 @@
|
|||||||
|
|
||||||
#undef INTERNAL_SYSCALL
|
#undef INTERNAL_SYSCALL
|
||||||
#define INTERNAL_SYSCALL(name, err, nr, args...) \
|
#define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||||
(((__NR_##name) < 256) ? \
|
(((__NR_##name) < 256) \
|
||||||
INTERNAL_SYSCALL_DIRECT(name, err, nr, args) : \
|
? INTERNAL_SYSCALL_DIRECT(name, err, nr, args) \
|
||||||
INTERNAL_SYSCALL_SVC0(name, err,nr, args))
|
: INTERNAL_SYSCALL_SVC0(name, err,nr, args))
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_ERROR_P
|
#undef INTERNAL_SYSCALL_ERROR_P
|
||||||
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||||
|
@ -58,8 +58,8 @@ __get_clockfreq_via_cpuinfo (void)
|
|||||||
|
|
||||||
while (mhz < endp && *mhz != '\n')
|
while (mhz < endp && *mhz != '\n')
|
||||||
{
|
{
|
||||||
if ((*mhz >= '0' && *mhz <= '9') ||
|
if ((*mhz >= '0' && *mhz <= '9')
|
||||||
(*mhz >= 'a' && *mhz <= 'f'))
|
|| (*mhz >= 'a' && *mhz <= 'f'))
|
||||||
{
|
{
|
||||||
result <<= 4;
|
result <<= 4;
|
||||||
if (*mhz >= '0' && *mhz <= '9')
|
if (*mhz >= '0' && *mhz <= '9')
|
||||||
|
Reference in New Issue
Block a user