Debian Codegraph @

common/OS_Semaphores.h

raw symbols SCIP
1 /* Copyright 2000 Kjetil S. Matheussen
2
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License
5 as published by the Free Software Foundation; either version 2
6 of the License, or (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
16
17
18 struct _RSemaphore;
19 typedef struct _RSemaphore RSemaphore;
20
21 // waiters/signallers??? It's not complicated:
22 // num_signallers == -num_waiters
23 // num_waiters == -num_signallers
24
25 extern LANGSPEC RSemaphore *RSEMAPHORE_create(int num_signallers);
26 extern LANGSPEC void RSEMAPHORE_delete(RSemaphore *semaphore);
27
28 extern LANGSPEC void RSEMAPHORE_reset(RSemaphore *semaphore);
29
30 extern LANGSPEC void RSEMAPHORE_set_num_waiters(RSemaphore *semaphore, int num_waiters);
31 extern LANGSPEC void RSEMAPHORE_get_num_waiters(RSemaphore *semaphore);
32
33 extern LANGSPEC void RSEMAPHORE_set_num_signallers(RSemaphore *semaphore, int num_signallers);
34 extern LANGSPEC void RSEMAPHORE_get_num_signallers(RSemaphore *semaphore);
35
36 extern LANGSPEC void RSEMAPHORE_wait(RSemaphore *semaphore, int num_waiters);
37 extern LANGSPEC void RSEMAPHORE_signal(RSemaphore *semaphore, int num_signallers);
38