Blame sysdeps/htl/pthreadP.h

Packit 6c4009
/* Declarations of internal pthread functions used by libc.  Hurd version.
Packit 6c4009
   Copyright (C) 2016-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 _PTHREADP_H
Packit 6c4009
#define _PTHREADP_H	1
Packit 6c4009
Packit 6c4009
#include <pthread.h>
Packit 6c4009
Packit 6c4009
/* These represent the interface used by glibc itself.  */
Packit 6c4009
Packit 6c4009
extern pthread_t __pthread_self (void);
Packit 6c4009
extern int __pthread_kill (pthread_t threadid, int signo);
Packit 6c4009
extern struct __pthread **__pthread_threads;
Packit 6c4009
Packit 6c4009
extern int _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr);
Packit 6c4009
extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
Packit 6c4009
extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
Packit 6c4009
Packit 6c4009
extern int __pthread_cond_broadcast (pthread_cond_t *cond);
Packit 6c4009
Packit 6c4009
typedef struct __cthread *__cthread_t;
Packit 6c4009
typedef int __cthread_key_t;
Packit 6c4009
typedef void *	(*__cthread_fn_t)(void *__arg);
Packit 6c4009
Packit 6c4009
__cthread_t __cthread_fork (__cthread_fn_t, void *);
Packit 6c4009
int __pthread_create (pthread_t *newthread,
Packit 6c4009
		      const pthread_attr_t *attr,
Packit 6c4009
		      void *(*start_routine) (void *), void *arg);
Packit 6c4009
Packit 6c4009
void __cthread_detach (__cthread_t);
Packit 6c4009
int __pthread_detach (pthread_t __threadp);
Packit 6c4009
void __pthread_exit (void *value) __attribute__ ((__noreturn__));
Packit 6c4009
int __cthread_keycreate (__cthread_key_t *);
Packit 6c4009
int __cthread_getspecific (__cthread_key_t, void **);
Packit 6c4009
int __cthread_setspecific (__cthread_key_t, void *);
Packit 6c4009
int __pthread_key_create (pthread_key_t *key, void (*destr) (void *));
Packit 6c4009
void *__pthread_getspecific (pthread_key_t key);
Packit 6c4009
int __pthread_setspecific (pthread_key_t key, const void *value);
Packit 6c4009
Packit 6c4009
int __pthread_setcancelstate (int state, int *oldstate);
Packit 6c4009
Packit 6c4009
int __pthread_getattr_np (pthread_t, pthread_attr_t *);
Packit 6c4009
int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr,
Packit 6c4009
				 void **__restrict __stackaddr);
Packit 6c4009
int __pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr);
Packit 6c4009
int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr,
Packit 6c4009
				 size_t *__restrict __stacksize);
Packit 6c4009
int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize);
Packit 6c4009
int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
Packit 6c4009
			     size_t __stacksize);
Packit 6c4009
int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
Packit 6c4009
struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void) attribute_hidden;
Packit 6c4009
Packit 6c4009
#if IS_IN (libpthread)
Packit 6c4009
hidden_proto (__pthread_key_create)
Packit 6c4009
hidden_proto (_pthread_mutex_init)
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#endif	/* pthreadP.h */