File: Csemaphore.h

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (30 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * Copyright (C) 1990-2000 by CERN/IT/PDP/DM
 * All rights reserved
 */

#include <stdio.h>
#include <Cthread_api.h>

#ifndef CSEMAPHORES
#define CSEMAPHORES

typedef struct CSemaphore
{
    int         v;
}
CSemaphore;


int         Csemaphore_down (CSemaphore * s);
int         Csemaphore_up (CSemaphore * s);
void        Csemaphore_destroy (CSemaphore * s);
void        Csemaphore_init (CSemaphore * s,int v);
int         Csemaphore_value (CSemaphore * s);
int         tw_pthread_cond_signal (void * c);
int         tw_pthread_cond_wait (void * c);
int         tw_pthread_mutex_unlock (void * m);
int         tw_pthread_mutex_lock (void * m);
void        do_error (char *msg);

#endif /* CSEMAPHORES */