~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/glthread/lock.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- buffer-read-only: t -*- vi: set ro: */
2
 
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3
1
/* Locking in multithreaded situations.
4
 
   Copyright (C) 2005-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2005-2012 Free Software Foundation, Inc.
5
3
 
6
4
   This program is free software; you can redistribute it and/or modify
7
5
   it under the terms of the GNU General Public License as published by
14
12
   GNU General Public License for more details.
15
13
 
16
14
   You should have received a copy of the GNU General Public License
17
 
   along with this program; if not, write to the Free Software Foundation,
18
 
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
15
   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
19
16
 
20
17
/* Written by Bruno Haible <bruno@clisp.org>, 2005.
21
18
   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
616
613
 
617
614
/* ========================================================================= */
618
615
 
619
 
#if USE_WIN32_THREADS
 
616
#if USE_WINDOWS_THREADS
620
617
 
 
618
# define WIN32_LEAN_AND_MEAN  /* avoid including junk */
621
619
# include <windows.h>
622
620
 
623
621
# ifdef __cplusplus
624
622
extern "C" {
625
623
# endif
626
624
 
627
 
/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex,
628
 
   Semaphore types, because
 
625
/* We can use CRITICAL_SECTION directly, rather than the native Windows Event,
 
626
   Mutex, Semaphore types, because
629
627
     - we need only to synchronize inside a single process (address space),
630
628
       not inter-process locking,
631
629
     - we don't need to support trylock operations.  (TryEnterCriticalSection
711
709
 
712
710
/* --------------------- gl_recursive_lock_t datatype --------------------- */
713
711
 
714
 
/* The Win32 documentation says that CRITICAL_SECTION already implements a
715
 
   recursive lock.  But we need not rely on it: It's easy to implement a
716
 
   recursive lock without this assumption.  */
 
712
/* The native Windows documentation says that CRITICAL_SECTION already
 
713
   implements a recursive lock.  But we need not rely on it: It's easy to
 
714
   implement a recursive lock without this assumption.  */
717
715
 
718
716
typedef struct
719
717
        {
765
763
 
766
764
/* ========================================================================= */
767
765
 
768
 
#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS)
 
766
#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS)
769
767
 
770
768
/* Provide dummy implementation if threads are not supported.  */
771
769