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

« back to all changes in this revision

Viewing changes to lib/glthread/lock.c

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Locking in multithreaded situations.
2
 
   Copyright (C) 2005-2012 Free Software Foundation, Inc.
 
2
   Copyright (C) 2005-2013 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software; you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
682
682
/* In this file, the waitqueues are implemented as circular arrays.  */
683
683
#define gl_waitqueue_t gl_carray_waitqueue_t
684
684
 
685
 
static inline void
 
685
static void
686
686
gl_waitqueue_init (gl_waitqueue_t *wq)
687
687
{
688
688
  wq->array = NULL;
743
743
}
744
744
 
745
745
/* Notifies the first thread from a wait queue and dequeues it.  */
746
 
static inline void
 
746
static void
747
747
gl_waitqueue_notify_first (gl_waitqueue_t *wq)
748
748
{
749
749
  SetEvent (wq->array[wq->offset + 0]);
754
754
}
755
755
 
756
756
/* Notifies all threads from a wait queue and dequeues them all.  */
757
 
static inline void
 
757
static void
758
758
gl_waitqueue_notify_all (gl_waitqueue_t *wq)
759
759
{
760
760
  unsigned int i;