This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [review v3] nptl: Add struct_mutex.h
On Nov 20 2019, Adhemerval Zanella (Code Review) wrote:
> diff --git a/sysdeps/nptl/bits/struct_mutex.h b/sysdeps/nptl/bits/struct_mutex.h
> new file mode 100644
> index 0000000..138320b
> --- /dev/null
> +++ b/sysdeps/nptl/bits/struct_mutex.h
> @@ -0,0 +1,84 @@
> +/* Default mutex implementation struct definitions.
> + Copyright (C) 2019 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
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library 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
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +#ifndef _THREAD_MUTEX_INTERNAL_H
> +#define _THREAD_MUTEX_INTERNAL_H 1
> +
> +/* Generic struct for both POSIX and C11 mutexes. New ports are expected
> + to use the default layout, however architecture can redefine it to
architectures
> + add arch-specific extension (such as lock-elision). The struct have
extensions has
> diff --git a/sysdeps/nptl/bits/thread-shared-types.h b/sysdeps/nptl/bits/thread-shared-types.h
> index f7eb8d4..0727fde 100644
> --- a/sysdeps/nptl/bits/thread-shared-types.h
> +++ b/sysdeps/nptl/bits/thread-shared-types.h
> + 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
> + definition). It should contains at least the internal members
contain
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."