~ubuntu-branches/ubuntu/oneiric/nis/oneiric-proposed

« back to all changes in this revision

Viewing changes to ypbind-mt-1.19/src/pthread_np.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2005-11-16 23:42:06 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051116234206-p00omaw5ji5q0qhr
Tags: 3.15-3ubuntu1
Resynchronise with Debian.  (me)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 1998, 1999 Thorsten Kukuk, Germany
2
 
 
3
 
   This file is part of ypbind-mt.
4
 
 
5
 
   Author: Thorsten Kukuk <kukuk@suse.de>
6
 
 
7
 
   The ypbind-mt are free software; you can redistribute it and/or
8
 
   modify it under the terms of the GNU General Public License as
9
 
   published by the Free Software Foundation; either version 2 of the
10
 
   License, or (at your option) any later version.
11
 
 
12
 
   ypbind-mt is distributed in the hope that it will be useful,
13
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
   General Public License for more details.
16
 
 
17
 
   You should have received a copy of the GNU General Public
18
 
   License along with ypbind-mt; see the file COPYING.  If not,
19
 
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
   Boston, MA 02111-1307, USA. */
21
 
 
22
 
#ifndef _PTHREAD_NP_H
23
 
#define _PTHREAD_NP_H
24
 
 
25
 
#include <pthread.h>
26
 
 
27
 
typedef struct {
28
 
  int readers;
29
 
  int writers;
30
 
  int wishwrite;
31
 
  pthread_mutex_t mutex;
32
 
  pthread_cond_t lock_free;
33
 
} pthread_rdwr_t;
34
 
 
35
 
#define PTHREAD_RDWR_INITIALIZER \
36
 
         {0, 0, 0, PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER}
37
 
 
38
 
int pthread_rdwr_init_np (pthread_rdwr_t *rdwrp);
39
 
int pthread_rdwr_rlock_np (pthread_rdwr_t *rdwrp);
40
 
int pthread_rdwr_wlock_np (pthread_rdwr_t *rdwrp);
41
 
int pthread_rdwr_runlock_np (pthread_rdwr_t *rdwrp);
42
 
int pthread_rdwr_wunlock_np (pthread_rdwr_t *rdwrp);
43
 
 
44
 
#endif