loader: remove shouting from ORB's variable name
[hvf.git] / cp / include / ldep.h
blobf80c380873aa7081fadf30fa22c8e0f4784e008f
1 /*
2 * (C) Copyright 2007-2011 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
5 * details.
6 */
8 #ifndef __LDEP_H
9 #define __LDEP_H
11 #define LDEP_STACK_SIZE 10
13 struct held_lock {
14 void *ra; /* return address */
15 void *lock; /* the lock */
16 char *lockname; /* name of this lock */
17 struct lock_class *lclass; /* the class for this lock */
20 struct lock_class {
21 char *name;
22 void *ra;
23 int ndeps;
24 struct lock_class **deps;
27 #define LOCK_CLASS(cname) \
28 struct lock_class cname = { \
29 .name = #cname, \
30 .ra = NULL, \
31 .ndeps = 0, \
32 .deps = NULL, \
35 extern void ldep_on();
37 extern void ldep_lock(void *lock, struct lock_class *c, char *lockname);
38 extern void ldep_unlock(void *lock, char *lockname);
39 extern void ldep_no_locks();
41 #endif