Blame sysdeps/htl/pthread-functions.h

Packit 6c4009
/* Declaration of libc stubs for pthread functions.  Hurd version.
Packit 6c4009
   Copyright (C) 2003-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library;  if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _PTHREAD_FUNCTIONS_H
Packit 6c4009
#define _PTHREAD_FUNCTIONS_H	1
Packit 6c4009
Packit 6c4009
#include <pthread.h>
Packit 6c4009
Packit 6c4009
int __pthread_attr_destroy (pthread_attr_t *);
Packit 6c4009
int __pthread_attr_init (pthread_attr_t *);
Packit 6c4009
int __pthread_attr_getdetachstate (const pthread_attr_t *, int *);
Packit 6c4009
int __pthread_attr_setdetachstate (pthread_attr_t *, int);
Packit 6c4009
int __pthread_attr_getinheritsched (const pthread_attr_t *, int *);
Packit 6c4009
int __pthread_attr_setinheritsched (pthread_attr_t *, int);
Packit 6c4009
int __pthread_attr_getschedparam (const pthread_attr_t *,
Packit 6c4009
				 struct sched_param *);
Packit 6c4009
int __pthread_attr_setschedparam (pthread_attr_t *,
Packit 6c4009
				 const struct sched_param *);
Packit 6c4009
int __pthread_attr_getschedpolicy (const pthread_attr_t *, int *);
Packit 6c4009
int __pthread_attr_setschedpolicy (pthread_attr_t *, int);
Packit 6c4009
int __pthread_attr_getscope (const pthread_attr_t *, int *);
Packit 6c4009
int __pthread_attr_setscope (pthread_attr_t *, int);
Packit 6c4009
int __pthread_condattr_destroy (pthread_condattr_t *);
Packit 6c4009
int __pthread_condattr_init (pthread_condattr_t *);
Packit 6c4009
int __pthread_cond_broadcast (pthread_cond_t *);
Packit 6c4009
int __pthread_cond_destroy (pthread_cond_t *);
Packit 6c4009
int __pthread_cond_init (pthread_cond_t *,
Packit 6c4009
		       const pthread_condattr_t *);
Packit 6c4009
int __pthread_cond_signal (pthread_cond_t *);
Packit 6c4009
int __pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *);
Packit 6c4009
int __pthread_cond_timedwait (pthread_cond_t *, pthread_mutex_t *,
Packit 6c4009
			     const struct timespec *);
Packit 6c4009
int __pthread_equal (pthread_t, pthread_t);
Packit 6c4009
void __pthread_exit (void *);
Packit 6c4009
int __pthread_getschedparam (pthread_t, int *, struct sched_param *);
Packit 6c4009
int __pthread_setschedparam (pthread_t, int,
Packit 6c4009
			    const struct sched_param *);
Packit 6c4009
int _pthread_mutex_destroy (pthread_mutex_t *);
Packit 6c4009
int _pthread_mutex_init (pthread_mutex_t *,
Packit 6c4009
			 const pthread_mutexattr_t *);
Packit 6c4009
int __pthread_mutex_lock (pthread_mutex_t *);
Packit 6c4009
int __pthread_mutex_trylock (pthread_mutex_t *);
Packit 6c4009
int __pthread_mutex_unlock (pthread_mutex_t *);
Packit 6c4009
pthread_t __pthread_self (void);
Packit 6c4009
int __pthread_setcancelstate (int, int *);
Packit 6c4009
int __pthread_setcanceltype (int, int *);
Packit 6c4009
struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
Packit 6c4009
int __pthread_once (pthread_once_t *, void (*) (void));
Packit 6c4009
int __pthread_rwlock_rdlock (pthread_rwlock_t *);
Packit 6c4009
int __pthread_rwlock_wrlock (pthread_rwlock_t *);
Packit 6c4009
int __pthread_rwlock_unlock (pthread_rwlock_t *);
Packit 6c4009
int __pthread_key_create (pthread_key_t *, void (*) (void *));
Packit 6c4009
void *__pthread_getspecific (pthread_key_t);
Packit 6c4009
int __pthread_setspecific (pthread_key_t, const void *);
Packit 6c4009
Packit 6c4009
void _cthreads_flockfile (FILE *);
Packit 6c4009
void _cthreads_funlockfile (FILE *);
Packit 6c4009
int _cthreads_ftrylockfile (FILE *);
Packit 6c4009
Packit 6c4009
/* Data type shared with libc.  The libc uses it to pass on calls to
Packit 6c4009
   the thread functions.  Wine pokes directly into this structure,
Packit 6c4009
   so if possible avoid breaking it and append new hooks to the end.  */
Packit 6c4009
struct pthread_functions
Packit 6c4009
{
Packit 6c4009
  int (*ptr_pthread_attr_destroy) (pthread_attr_t *);
Packit 6c4009
  int (*ptr_pthread_attr_init) (pthread_attr_t *);
Packit 6c4009
  int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *);
Packit 6c4009
  int (*ptr_pthread_attr_setdetachstate) (pthread_attr_t *, int);
Packit 6c4009
  int (*ptr_pthread_attr_getinheritsched) (const pthread_attr_t *, int *);
Packit 6c4009
  int (*ptr_pthread_attr_setinheritsched) (pthread_attr_t *, int);
Packit 6c4009
  int (*ptr_pthread_attr_getschedparam) (const pthread_attr_t *,
Packit 6c4009
					 struct sched_param *);
Packit 6c4009
  int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *,
Packit 6c4009
					 const struct sched_param *);
Packit 6c4009
  int (*ptr_pthread_attr_getschedpolicy) (const pthread_attr_t *, int *);
Packit 6c4009
  int (*ptr_pthread_attr_setschedpolicy) (pthread_attr_t *, int);
Packit 6c4009
  int (*ptr_pthread_attr_getscope) (const pthread_attr_t *, int *);
Packit 6c4009
  int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int);
Packit 6c4009
  int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *);
Packit 6c4009
  int (*ptr_pthread_condattr_init) (pthread_condattr_t *);
Packit 6c4009
  int (*ptr_pthread_cond_broadcast) (pthread_cond_t *);
Packit 6c4009
  int (*ptr_pthread_cond_destroy) (pthread_cond_t *);
Packit 6c4009
  int (*ptr_pthread_cond_init) (pthread_cond_t *,
Packit 6c4009
			       const pthread_condattr_t *);
Packit 6c4009
  int (*ptr_pthread_cond_signal) (pthread_cond_t *);
Packit 6c4009
  int (*ptr_pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
Packit 6c4009
  int (*ptr_pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
Packit 6c4009
				     const struct timespec *);
Packit 6c4009
  int (*ptr_pthread_equal) (pthread_t, pthread_t);
Packit 6c4009
  void (*ptr___pthread_exit) (void *);
Packit 6c4009
  int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *);
Packit 6c4009
  int (*ptr_pthread_setschedparam) (pthread_t, int,
Packit 6c4009
				    const struct sched_param *);
Packit 6c4009
  int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *);
Packit 6c4009
  int (*ptr_pthread_mutex_init) (pthread_mutex_t *,
Packit 6c4009
				 const pthread_mutexattr_t *);
Packit 6c4009
  int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
Packit 6c4009
  int (*ptr_pthread_mutex_trylock) (pthread_mutex_t *);
Packit 6c4009
  int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
Packit 6c4009
  pthread_t (*ptr_pthread_self) (void);
Packit 6c4009
  int (*ptr___pthread_setcancelstate) (int, int *);
Packit 6c4009
  int (*ptr_pthread_setcanceltype) (int, int *);
Packit 6c4009
  struct __pthread_cancelation_handler **(*ptr___pthread_get_cleanup_stack) (void);
Packit 6c4009
  int (*ptr_pthread_once) (pthread_once_t *, void (*) (void));
Packit 6c4009
  int (*ptr_pthread_rwlock_rdlock) (pthread_rwlock_t *);
Packit 6c4009
  int (*ptr_pthread_rwlock_wrlock) (pthread_rwlock_t *);
Packit 6c4009
  int (*ptr_pthread_rwlock_unlock) (pthread_rwlock_t *);
Packit 6c4009
  int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *));
Packit 6c4009
  void *(*ptr___pthread_getspecific) (pthread_key_t);
Packit 6c4009
  int (*ptr___pthread_setspecific) (pthread_key_t, const void *);
Packit 6c4009
  void (*ptr__IO_flockfile) (FILE *);
Packit 6c4009
  void (*ptr__IO_funlockfile) (FILE *);
Packit 6c4009
  int (*ptr__IO_ftrylockfile) (FILE *);
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
/* Variable in libc.so.  */
Packit 6c4009
extern struct pthread_functions __libc_pthread_functions attribute_hidden;
Packit 6c4009
extern int __libc_pthread_functions_init attribute_hidden;
Packit 6c4009
Packit 6c4009
void __libc_pthread_init (const struct pthread_functions *functions);
Packit 6c4009
Packit 6c4009
#define PTHFCT_CALL(fct, params) \
Packit 6c4009
    __libc_pthread_functions.fct params
Packit 6c4009
Packit 6c4009
#endif	/* pthread-functions.h */