vpcd: added real thread safety

This commit is contained in:
Frank Morgner
2014-03-28 07:08:31 +01:00
parent ac3b70f4d1
commit 0aec0e4d31
10 changed files with 531 additions and 47 deletions

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2014 Frank Morgner
*
* This file is part of virtualsmartcard.
*
* virtualsmartcard 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 3 of the License, or (at your option)
* any later version.
*
* virtualsmartcard 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
* virtualsmartcard. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _LOCK_H_
#define _LOCK_H_
#ifdef __cplusplus
extern "C" {
#endif
int lock(void *io_lock);
int unlock(void *io_lock);
void *create_lock(void);
void free_lock(void *io_lock);
#ifdef __cplusplus
}
#endif
#endif