mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-18 11:00:07 +00:00
ce75c139ac
2000-01-12 Ulrich Drepper <drepper@cygnus.com> * iconvdata/gconv-modules: Add aliases ISO-IR-199 and ISO-IR-203. Reported by Bruno Haible <haible@ilog.fr>. 2000-01-11 Andreas Schwab <schwab@suse.de> * sysdeps/i386/fpu/libm-test-ulps: Adjust some epsilons. 2000-01-10 Thorsten Kukuk <kukuk@suse.de> * nss/getent.c: Add ipv6 support for hosts. 2000-01-05 Philip Blundell <pb@futuretv.com> * sysdeps/unix/sysv/linux/arm/Versions: Add getrlimit, setrlimit, getrlimit64, setrlimit64 for GLIBC_2.1.3. * sysdeps/unix/sysv/linux/arm/syscalls.list: Add oldgetrlimit, oldsetrlimit. * sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c: New file. * sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c: Likewise. * sysdeps/unix/sysv/linux/arm/setrlimit64.c: Likewise. * sysdeps/unix/sysv/linux/arm/getrlimit64.c: Likewise. * sysdeps/unix/sysv/linux/arm/setrlimit.c: Likewise. * sysdeps/unix/sysv/linux/arm/getrlimit.c: Likewise. * sysdeps/unix/sysv/linux/arm/Makefile [subdir=resource] (sysdep_routines): Add oldgetrlimit64, oldsetrlimit64. [subdir=misc] (sysdep_headers): Add sys/elf.h. 2000-01-09 Andreas Jaeger <aj@suse.de> * manual/install.texi (Tools for Compilation): Update required compiler version. (Configuring and compiling): Restore old comments about configparms; modify to reflect current usage. 2000-01-09 Philip Blundell <philb@gnu.org> * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't attempt name resolution if the hints included AI_NUMERICHOST.
62 lines
2.0 KiB
C
62 lines
2.0 KiB
C
/* Linuxthreads - a simple clone()-based implementation of Posix */
|
|
/* threads for Linux. */
|
|
/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
|
|
/* */
|
|
/* This program is free software; you can redistribute it and/or */
|
|
/* modify it under the terms of the GNU Library General Public License */
|
|
/* as published by the Free Software Foundation; either version 2 */
|
|
/* of the License, or (at your option) any later version. */
|
|
/* */
|
|
/* This program is distributed in the hope that it will be useful, */
|
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
|
/* GNU Library General Public License for more details. */
|
|
|
|
/* Waiting queues */
|
|
|
|
/* Waiting queues are represented by lists of thread descriptors
|
|
linked through their p_nextwaiting field. The lists are kept
|
|
sorted by decreasing priority, and then decreasing waiting time. */
|
|
|
|
static inline void enqueue(pthread_descr * q, pthread_descr th)
|
|
{
|
|
int prio = th->p_priority;
|
|
ASSERT(th->p_nextwaiting == NULL);
|
|
for (; *q != NULL; q = &((*q)->p_nextwaiting)) {
|
|
if (prio > (*q)->p_priority) {
|
|
th->p_nextwaiting = *q;
|
|
*q = th;
|
|
return;
|
|
}
|
|
}
|
|
*q = th;
|
|
}
|
|
|
|
static inline pthread_descr dequeue(pthread_descr * q)
|
|
{
|
|
pthread_descr th;
|
|
th = *q;
|
|
if (th != NULL) {
|
|
*q = th->p_nextwaiting;
|
|
th->p_nextwaiting = NULL;
|
|
}
|
|
return th;
|
|
}
|
|
|
|
static inline int remove_from_queue(pthread_descr * q, pthread_descr th)
|
|
{
|
|
for (; *q != NULL; q = &((*q)->p_nextwaiting)) {
|
|
if (*q == th) {
|
|
*q = th->p_nextwaiting;
|
|
th->p_nextwaiting = NULL;
|
|
return 1;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static inline int queue_is_empty(pthread_descr * q)
|
|
{
|
|
return *q == NULL;
|
|
}
|