Files
smmapdfw/smmapdfw/libsmmapdfw/count.h
2004-10-11 15:28:12 +00:00

44 lines
1.1 KiB
C

/*
Copyright (C) 2004, Wolfgang Hottgenroth
This file is part of smmapdfw.
smmapdfw is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with smmapdfw. If not, write to the Free Software Foundation, 59
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _COUNT_H_
#define _COUNT_H_
#include <pthread.h>
struct count_s {
int cnt;
pthread_mutex_t mutex;
};
typedef struct count_s count_t;
void count_init(count_t *c);
void count_destroy(count_t *c);
int count_inc(count_t *c);
int count_dec(count_t *c);
int count_get(count_t *c);
#endif /* _COUNT_H_ */