Lumiera  0.pre.03
»edit your freedom«
lockerror.h
Go to the documentation of this file.
1 /*
2  lockerror.h - error declarations for all locks (mutex, rwlocks, cond vars)
3 
4  Copyright (C) Lumiera.org
5  2010, Christian Thaeter <ct@pipapo.org>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21 
22 
27 #ifndef LUMIERA_LOCKERRORS_H
28 #define LUMIERA_LOCKERRORS_H
29 
30 #include "lib/error.h"
31 
32 /* fatal errors (EINVAL usually), we DIE on these, shall never ever happen on a correct program */
33 LUMIERA_ERROR_DECLARE (LOCK_ACQUIRE);
34 LUMIERA_ERROR_DECLARE (LOCK_RELEASE);
35 LUMIERA_ERROR_DECLARE (LOCK_DESTROY);
36 
37 /* runtime errors */
38 LUMIERA_ERROR_DECLARE (LOCK_INVAL);
39 LUMIERA_ERROR_DECLARE (LOCK_BUSY);
40 LUMIERA_ERROR_DECLARE (LOCK_DEADLK);
41 LUMIERA_ERROR_DECLARE (LOCK_PERM);
42 LUMIERA_ERROR_DECLARE (LOCK_TIMEOUT);
43 LUMIERA_ERROR_DECLARE (LOCK_AGAIN);
44 
48 void
49 lumiera_lockerror_set (int err, struct nobug_flag* flag, const struct nobug_context ctx);
50 
51 #endif
52 /*
53 // Local Variables:
54 // mode: C
55 // c-file-style: "gnu"
56 // indent-tabs-mode: nil
57 // End:
58 */
void lumiera_lockerror_set(int err, struct nobug_flag *flag, const struct nobug_context ctx)
Translate pthread error code into lumiera error.
Definition: lockerror.c:49
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
Definition: error.h:71
Lumiera error handling (C interface).