|
Packit |
d7e8d0 |
/* sema.h - Definitions for semaphores.
|
|
Packit |
d7e8d0 |
Copyright (C) 2000 Werner Koch (dd9jn)
|
|
Packit |
d7e8d0 |
Copyright (C) 2001, 2003, 2004, 2007 g10 Code GmbH
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
This file is part of GPGME.
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
GPGME is free software; you can redistribute it and/or modify it
|
|
Packit |
d7e8d0 |
under the terms of the GNU Lesser General Public License as
|
|
Packit |
d7e8d0 |
published by the Free Software Foundation; either version 2.1 of
|
|
Packit |
d7e8d0 |
the License, or (at your option) any later version.
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
GPGME is distributed in the hope that it will be useful, but
|
|
Packit |
d7e8d0 |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
d7e8d0 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
d7e8d0 |
Lesser General Public License for more details.
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
d7e8d0 |
License along with this program; if not, write to the Free Software
|
|
Packit |
d7e8d0 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
Packit |
d7e8d0 |
02111-1307, USA. */
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#ifndef SEMA_H
|
|
Packit |
d7e8d0 |
#define SEMA_H
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#include <gpg-error.h>
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#define DEFINE_GLOBAL_LOCK(name) \
|
|
Packit |
d7e8d0 |
gpgrt_lock_t name = GPGRT_LOCK_INITIALIZER
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#define DEFINE_STATIC_LOCK(name) \
|
|
Packit |
d7e8d0 |
static gpgrt_lock_t name = GPGRT_LOCK_INITIALIZER
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#define INIT_LOCK(name) \
|
|
Packit |
d7e8d0 |
name = (gpgrt_lock_t) GPGRT_LOCK_INITIALIZER
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#define DECLARE_LOCK(name) gpgrt_lock_t name
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#define DESTROY_LOCK(name) gpgrt_lock_destroy(&name)
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#define LOCK(name) gpgrt_lock_lock(&name)
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#define UNLOCK(name) gpgrt_lock_unlock(&name)
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#endif /* SEMA_H */
|