Welcome to mirror list, hosted at ThFree Co, Russian Federation.

semaphore.h « include « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6dbfa09ac6d2f37d55509789d648070f65eda779 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
/* semaphore.h: POSIX semaphore interface

   Copyright 2001 Red Hat, Inc.

   Written by Robert Collins <rbtcollins@hotmail.com>

   This file is part of Cygwin.

   This software is a copyrighted work licensed under the terms of the
   Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
   details. */

#include <sys/types.h>

#ifndef _SEMAPHORE_H
#define _SEMAPHORE_H

#ifdef __cplusplus
extern "C"
{
#endif

#ifndef __INSIDE_CYGWIN__
  typedef void *sem_t;
#endif

#define SEM_FAILED 0
#define SEM_VALUE_MAX 1147483648

/* Semaphores */
  int sem_init (sem_t * sem, int pshared, unsigned int value);
  int sem_destroy (sem_t * sem);
  int sem_wait (sem_t * sem);
  int sem_trywait (sem_t * sem);
  int sem_post (sem_t * sem);

#ifdef __cplusplus
}
#endif

#endif				/* _SEMAPHORE_H */