* include/sys/wait.h: Add some prototypes.
	* Rules (dummy.c): Create also prototype to shut up GCC.

2000-12-27  Andreas Jaeger  <aj@suse.de>
This commit is contained in:
Andreas Jaeger 2000-12-27 17:18:07 +00:00
parent a375a533a2
commit 27ee0a5595
27 changed files with 155 additions and 36 deletions

View File

@ -1,3 +1,8 @@
2000-12-27 Andreas Jaeger <aj@suse.de>
* include/sys/wait.h: Add some prototypes.
* Rules (dummy.c): Create also prototype to shut up GCC.
2000-12-27 Andreas Jaeger <aj@suse.de>
* sysdeps/mach/hurd/if_index.c (__protocol_available): Uncomment,

3
Rules
View File

@ -74,7 +74,8 @@ endef
$(common-objpfx)dummy.c:
rm -f $@
echo 'void __dummy__ (void) { }' > $@
(echo 'extern void __dummy__ (void);'; \
echo 'void __dummy__ (void) { }') > $@
common-generated += dummy.o dummy.c
# This makes all the auxiliary and test programs.

View File

@ -4,6 +4,8 @@
/* Now define the internal interfaces. */
extern __pid_t __waitpid (__pid_t __pid, int *__stat_loc,
int __options);
extern __pid_t __libc_waitpid (pid_t __pid, int *__stat_loc, int __options);
extern __pid_t __libc_wait (int *__stat_loc);
extern __pid_t __wait3 (__WAIT_STATUS __stat_loc,
int __options, struct rusage * __usage);
extern __pid_t __wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc,

View File

@ -1,3 +1,45 @@
2000-12-27 Andreas Jaeger <aj@suse.de>
* Examples/ex13.c: Make local functions static.
* ecmutex.c: Likewise.
* Examples/ex14.c: Likewise.
* Examples/ex2.c: Make local functions static; reformat.
* Examples/ex1.c: Likewise.
* Examples/ex4.c: Likewise.
* Examples/ex5.c: Likewise.
* Examples/ex7.c: Likewise.
* oldsemaphore.c: Add prototypes to shut up GCC.
* pt-machine.c: Likewise.
* weaks.c: Add prototype for pthread_exit.
* internals.h: Add some prototypes, format prototypes and add
missing externs.
Move __libc_waitpid prototype to include/sys/wait.h.
* rwlock.c: Include <bits/libc-lock.h> for prototypes.
* mutex.c: Likewise.
* specific.c: Likewise.
* ptfork.c: Likewise.
* lockfile.c: Include internals.h to get prototypes.
* events.c: Likewise.
* sysdeps/alpha/pspinlock.c: Likewise.
* sysdeps/arm/pspinlock.c: Likewise.
* sysdeps/hppa/pspinlock.c: Likewise.
* sysdeps/i386/pspinlock.c: Likewise.
* sysdeps/ia64/pspinlock.c: Likewise.
* sysdeps/m68k/pspinlock.c: Likewise.
* sysdeps/mips/pspinlock.c: Likewise.
* sysdeps/powerpc/pspinlock.c: Likewise.
* sysdeps/s390/pspinlock.c: Likewise.
* sysdeps/sh/pspinlock.c: Likewise.
* sysdeps/sparc/sparc32/pspinlock.c: Likewise.
* sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
* sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2000-12-27 Ulrich Drepper <drepper@redhat.com>
* attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.

View File

@ -1,5 +1,5 @@
/* Event functions used while debugging.
Copyright (C) 1999 Free Software Foundation, Inc.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -19,6 +19,8 @@
/* The functions contained here do nothing, they just return. */
#include "internals.h"
void
__linuxthreads_create_event (void)
{

View File

@ -427,21 +427,22 @@ static inline pthread_descr thread_self (void)
/* Internal global functions */
void __pthread_destroy_specifics(void);
void __pthread_perform_cleanup(void);
int __pthread_initialize_manager(void);
void __pthread_message(char * fmt, ...);
int __pthread_manager(void *reqfd);
int __pthread_manager_event(void *reqfd);
void __pthread_manager_sighandler(int sig);
void __pthread_reset_main_thread(void);
void __pthread_once_fork_prepare(void);
void __pthread_once_fork_parent(void);
void __pthread_once_fork_child(void);
void __flockfilelist(void);
void __funlockfilelist(void);
void __fresetlockfiles(void);
void __pthread_manager_adjust_prio(int thread_prio);
extern void __pthread_destroy_specifics (void);
extern void __pthread_perform_cleanup (void);
extern int __pthread_initialize_manager (void);
extern void __pthread_message (char * fmt, ...);
extern int __pthread_manager (void *reqfd);
extern int __pthread_manager_event (void *reqfd);
extern void __pthread_manager_sighandler (int sig);
extern void __pthread_reset_main_thread (void);
extern void __pthread_once_fork_prepare (void);
extern void __pthread_once_fork_parent (void);
extern void __pthread_once_fork_child (void);
extern void __flockfilelist (void);
extern void __funlockfilelist (void);
extern void __fresetlockfiles (void);
extern void __pthread_manager_adjust_prio (int thread_prio);
extern void __pthread_initialize_minimal (void);
extern int __pthread_attr_setguardsize (pthread_attr_t *__attr,
size_t __guardsize);
@ -455,23 +456,52 @@ extern int __pthread_attr_setstacksize (pthread_attr_t *__attr,
size_t __stacksize);
extern int __pthread_attr_getstacksize (const pthread_attr_t *__attr,
size_t *__stacksize);
extern int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
size_t __stacksize);
extern int __pthread_attr_getstack (const pthread_attr_t *__attr, void **__stackaddr,
size_t *__stacksize);
extern int __pthread_getconcurrency (void);
extern int __pthread_setconcurrency (int __level);
extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
const struct timespec *__abstime);
extern int __pthread_mutexattr_getpshared (const pthread_mutexattr_t *__attr,
int *__pshared);
extern int __pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
int __pshared);
extern int __pthread_mutexattr_gettype (const pthread_mutexattr_t *__attr,
int *__kind);
extern void __pthread_kill_other_threads_np (void);
void __pthread_restart_old(pthread_descr th);
void __pthread_suspend_old(pthread_descr self);
int __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abs);
extern void __pthread_restart_old(pthread_descr th);
extern void __pthread_suspend_old(pthread_descr self);
extern int __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abs);
void __pthread_restart_new(pthread_descr th);
void __pthread_suspend_new(pthread_descr self);
int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abs);
extern void __pthread_restart_new(pthread_descr th);
extern void __pthread_suspend_new(pthread_descr self);
extern int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abs);
void __pthread_wait_for_restart_signal(pthread_descr self);
extern void __pthread_wait_for_restart_signal(pthread_descr self);
extern int __pthread_yield (void);
extern int __pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__restrict
__abstime);
extern int __pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__restrict
__abstime);
extern int __pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr);
extern int __pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
__restrict __attr,
int *__restrict __pshared);
extern int __pthread_spin_lock (pthread_spinlock_t *__lock);
extern int __pthread_spin_trylock (pthread_spinlock_t *__lock);
extern int __pthread_spin_unlock (pthread_spinlock_t *__lock);
extern int __pthread_spin_init (pthread_spinlock_t *__lock, int __pshared);
extern int __pthread_spin_destroy (pthread_spinlock_t *__lock);
int __pthread_yield (void);
/* Global pointers to old or new suspend functions */
@ -484,10 +514,25 @@ extern int (*__pthread_timedsuspend)(pthread_descr, const struct timespec *);
extern int __libc_close (int fd);
extern int __libc_nanosleep (const struct timespec *requested_time,
struct timespec *remaining);
extern pid_t __libc_waitpid (pid_t pid, int *stat_loc, int options);
/* Prototypes for some of the new semaphore functions. */
extern int __new_sem_post (sem_t * sem);
extern int __new_sem_init (sem_t *__sem, int __pshared, unsigned int __value);
extern int __new_sem_wait (sem_t *__sem);
extern int __new_sem_trywait (sem_t *__sem);
extern int __new_sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval);
extern int __new_sem_destroy (sem_t *__sem);
/* Prototypes for compatibility functions. */
extern int __pthread_attr_init_2_1 (pthread_attr_t *__attr);
extern int __pthread_attr_init_2_0 (pthread_attr_t *__attr);
extern int __pthread_create_2_1 (pthread_t *__restrict __thread,
const pthread_attr_t *__attr,
void *(*__start_routine) (void *),
void *__restrict __arg);
extern int __pthread_create_2_0 (pthread_t *__restrict thread,
const pthread_attr_t *__attr,
void *(*__start_routine) (void *),
void *__restrict arg);
/* The functions called the signal events. */
extern void __linuxthreads_create_event (void);

View File

@ -20,6 +20,7 @@
#include <bits/libc-lock.h>
#include <stdio.h>
#include <pthread.h>
#include "internals.h"
#ifdef USE_IN_LIBIO
#include "../libio/libioP.h"

View File

@ -14,6 +14,7 @@
/* Mutexes */
#include <bits/libc-lock.h>
#include <errno.h>
#include <sched.h>
#include <stddef.h>

View File

@ -34,6 +34,14 @@ typedef struct {
int sem_spinlock;
} old_sem_t;
extern int __old_sem_init (old_sem_t *__sem, int __pshared, unsigned int __value);
extern int __old_sem_wait (old_sem_t *__sem);
extern int __old_sem_trywait (old_sem_t *__sem);
extern int __old_sem_post (old_sem_t *__sem);
extern int __old_sem_getvalue (old_sem_t *__sem, int *__sval);
extern int __old_sem_destroy (old_sem_t *__sem);
/* Maximum value the semaphore can have. */
#define SEM_VALUE_MAX ((int) ((~0u) >> 1))

View File

@ -19,4 +19,7 @@
#define PT_EI
extern long int testandset (int *spinlock);
extern int __compare_and_swap (long int *p, long int oldval, long int newval);
#include <pt-machine.h>

View File

@ -20,6 +20,7 @@
#include <unistd.h>
#include "pthread.h"
#include "internals.h"
#include <bits/libc-lock.h>
struct handler_list {
void (*handler)(void);

View File

@ -19,6 +19,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <bits/libc-lock.h>
#include <errno.h>
#include <pthread.h>
#include <stdlib.h>

View File

@ -20,6 +20,8 @@
#include "pthread.h"
#include "internals.h"
#include "spinlock.h"
#include <bits/libc-lock.h>
/* Table of keys. */

View File

@ -19,6 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
/* This implementation is similar to the one used in the Linux kernel.

View File

@ -19,6 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
int

View File

@ -19,7 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
int
__pthread_spin_lock (pthread_spinlock_t *lock)

View File

@ -19,7 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
/* This implementation is similar to the one used in the Linux kernel.
But the kernel is byte instructions for the memory access. This is

View File

@ -20,7 +20,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
/* This implementation is inspired by the implementation used in the
Linux kernel. */

View File

@ -19,6 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
int

View File

@ -21,7 +21,7 @@
#include <pthread.h>
#include <sgidefs.h>
#include <sys/tas.h>
#include "internals.h"
#if (_MIPS_ISA >= _MIPS_ISA_MIPS2)

View File

@ -20,7 +20,7 @@
#include <errno.h>
#include <pthread.h>
#include <pt-machine.h>
#include "internals.h"
int
__pthread_spin_lock (pthread_spinlock_t *lock)

View File

@ -20,7 +20,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
/* This implementation is similar to the one used in the Linux kernel.
But the kernel is byte instructions for the memory access. This is

View File

@ -19,7 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
int
__pthread_spin_lock (pthread_spinlock_t *lock)

View File

@ -19,7 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
/* This implementation is similar to the one used in the Linux kernel. */
int

View File

@ -19,6 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
/* This implementation is similar to the one used in the Linux kernel. */

View File

@ -19,7 +19,7 @@
#include <errno.h>
#include <pthread.h>
#include "internals.h"
/* This implementation is similar to the one used in the Linux kernel. */
int

View File

@ -26,6 +26,7 @@
extern int __pthread_return_0 (void);
extern int __pthread_return_1 (void);
extern void __pthread_return_void (void);
extern void weak_function pthread_exit (void *__retval);
/* Those are pthread functions which return 0 if successful. */
weak_alias (__pthread_return_0, BP_SYM (__libc_pthread_attr_init_2_1))