summaryrefslogtreecommitdiff
path: root/sys/lockdoc/log.c
blob: 91d2a8d02cbcebcfcb5dc70e1100f028dc64610e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <arch/x86/include/cpufunc.h>
#include <sys/lockdoc.h>

#include "opt_lockdebug.h"

#ifdef LOCKDEBUG

struct log_action la_buffer;

void __x86_disable_intr(const char *file, int line, const char *func){
    // TODO Actually log things
    lockdoc_x86_disable_intr();
    __asm __volatile("cli" : : : "memory");
}

void __x86_enable_intr(const char *file, int line, const char *func){
    // TODO Actually log things
    lockdoc_x86_enable_intr();
	__asm __volatile ("sti" ::: "memory");
}

#endif /* LOCKDEBUG */