~ubuntu-branches/ubuntu/trusty/gettext/trusty

« back to all changes in this revision

Viewing changes to gettext-runtime/intl/lock.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-10-21 19:12:18 UTC
  • mfrom: (2.1.22 sid)
  • Revision ID: package-import@ubuntu.com-20131021191218-5t1ixdaae0dbc1l3
Tags: 0.18.3.1-1ubuntu1
* Merge with Debian; remaining changes:
  - Allow the package to cross-build.
  - Define a stage1 profile to build without java and git.
  - Throw away /usr/lib/gettext/gnu.gettext*; we don't need them.
  - Explicitly configure with --disable-csharp.
  - Keep gettext.jar in /usr/share/gettext instead of moving it to
    /usr/share/java.
  - Drop autopoint recommends of gettext. It pulls in git and
    other sizable packages which make the CDs explode.
* gettext-el: Add an alternative dependency on emacs24.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Locking in multithreaded situations.
2
2
   Copyright (C) 2005-2008 Free Software Foundation, Inc.
3
3
 
4
 
   This program is free software; you can redistribute it and/or modify it
5
 
   under the terms of the GNU Library General Public License as published
6
 
   by the Free Software Foundation; either version 2, or (at your option)
7
 
   any later version.
 
4
   This program is free software: you can redistribute it and/or modify
 
5
   it under the terms of the GNU Lesser General Public License as published by
 
6
   the Free Software Foundation; either version 2.1 of the License, or
 
7
   (at your option) any later version.
8
8
 
9
9
   This program is distributed in the hope that it will be useful,
10
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 
   Library General Public License for more details.
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
   GNU Lesser General Public License for more details.
13
13
 
14
 
   You should have received a copy of the GNU Library General Public
15
 
   License along with this program; if not, write to the Free Software
16
 
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17
 
   USA.  */
 
14
   You should have received a copy of the GNU Lesser General Public License
 
15
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18
16
 
19
17
/* Written by Bruno Haible <bruno@clisp.org>, 2005.
20
18
   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
631
629
 
632
630
/* ========================================================================= */
633
631
 
634
 
#if USE_WIN32_THREADS
 
632
#if USE_WINDOWS_THREADS
635
633
 
636
634
/* -------------------------- gl_lock_t datatype -------------------------- */
637
635
 
684
682
/* In this file, the waitqueues are implemented as circular arrays.  */
685
683
#define gl_waitqueue_t gl_carray_waitqueue_t
686
684
 
687
 
static inline void
 
685
static void
688
686
gl_waitqueue_init (gl_waitqueue_t *wq)
689
687
{
690
688
  wq->array = NULL;
745
743
}
746
744
 
747
745
/* Notifies the first thread from a wait queue and dequeues it.  */
748
 
static inline void
 
746
static void
749
747
gl_waitqueue_notify_first (gl_waitqueue_t *wq)
750
748
{
751
749
  SetEvent (wq->array[wq->offset + 0]);
756
754
}
757
755
 
758
756
/* Notifies all threads from a wait queue and dequeues them all.  */
759
 
static inline void
 
757
static void
760
758
gl_waitqueue_notify_all (gl_waitqueue_t *wq)
761
759
{
762
760
  unsigned int i;