Blame sysdeps/sparc/nptl/bits/pthreadtypes-arch.h

Packit 6c4009
/* Machine-specific pthread type layouts.  SPARC 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 _BITS_PTHREADTYPES_ARCH_H
Packit 6c4009
#define _BITS_PTHREADTYPES_ARCH_H	1
Packit 6c4009
Packit 6c4009
#include <bits/wordsize.h>
Packit 6c4009
Packit 6c4009
#if __WORDSIZE == 64
Packit 6c4009
# define __SIZEOF_PTHREAD_ATTR_T 56
Packit 6c4009
# define __SIZEOF_PTHREAD_MUTEX_T 40
Packit 6c4009
# define __SIZEOF_PTHREAD_CONDATTR_T 4
Packit 6c4009
# define __SIZEOF_PTHREAD_RWLOCK_T 56
Packit 6c4009
# define __SIZEOF_PTHREAD_BARRIER_T 32
Packit 6c4009
#else
Packit 6c4009
# define __SIZEOF_PTHREAD_ATTR_T 36
Packit 6c4009
# define __SIZEOF_PTHREAD_MUTEX_T 24
Packit 6c4009
# define __SIZEOF_PTHREAD_CONDATTR_T 4
Packit 6c4009
# define __SIZEOF_PTHREAD_RWLOCK_T 32
Packit 6c4009
# define __SIZEOF_PTHREAD_BARRIER_T 20
Packit 6c4009
#endif
Packit 6c4009
#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
Packit 6c4009
#define __SIZEOF_PTHREAD_COND_T 48
Packit 6c4009
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
Packit 6c4009
#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
Packit 6c4009
Packit 6c4009
/* Definitions for internal mutex struct.  */
Packit 6c4009
#define __PTHREAD_COMPAT_PADDING_MID
Packit 6c4009
#define __PTHREAD_COMPAT_PADDING_END
Packit 6c4009
#define __PTHREAD_MUTEX_LOCK_ELISION    0
Packit 6c4009
#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND  (__WORDSIZE != 64)
Packit 6c4009
#define __PTHREAD_MUTEX_USE_UNION          (__WORDSIZE != 64)
Packit 6c4009
Packit 6c4009
#define __LOCK_ALIGNMENT
Packit 6c4009
#define __ONCE_ALIGNMENT
Packit 6c4009
Packit 6c4009
struct __pthread_rwlock_arch_t
Packit 6c4009
{
Packit 6c4009
  unsigned int __readers;
Packit 6c4009
  unsigned int __writers;
Packit 6c4009
  unsigned int __wrphase_futex;
Packit 6c4009
  unsigned int __writers_futex;
Packit 6c4009
  unsigned int __pad3;
Packit 6c4009
  unsigned int __pad4;
Packit 6c4009
#if __WORDSIZE == 64
Packit 6c4009
  int __cur_writer;
Packit 6c4009
  int __shared;
Packit 6c4009
  unsigned long int __pad1;
Packit 6c4009
  unsigned long int __pad2;
Packit 6c4009
  /* FLAGS must stay at this position in the structure to maintain
Packit 6c4009
     binary compatibility.  */
Packit 6c4009
  unsigned int __flags;
Packit 6c4009
#else
Packit 6c4009
  unsigned char __pad1;
Packit 6c4009
  unsigned char __pad2;
Packit 6c4009
  unsigned char __shared;
Packit 6c4009
  /* FLAGS must stay at this position in the structure to maintain
Packit 6c4009
     binary compatibility.  */
Packit 6c4009
  unsigned char __flags;
Packit 6c4009
  int __cur_writer;
Packit 6c4009
#endif
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
Packit 6c4009
Packit 6c4009
#endif	/* bits/pthreadtypes.h */