summaryrefslogtreecommitdiffstats
path: root/tools/database/database.c
blob: 0f9304eb0a1e03283577ced2232c234f5293c082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* A _very_ skeleton file to demonstrate building tagcache db on host. */

#include <stdbool.h>
#include <stdio.h>
#include <sys/stat.h>
#include "tagcache.h"

int main(int argc, char **argv)
{
    tagcache_init();
    tagcache_build(".");
    tagcache_reverse_scan();
    
    return 0;
}

/* stub to avoid including all of apps/misc.c */
bool file_exists(const char *file)
{
    struct stat s;
    if (!stat(file, &s))
        return true;
    return false;
}

/* stubs to avoid including thread-sdl.c */
#include "kernel.h"
void mutex_init(struct mutex *m)
{
    (void)m;
}   

void mutex_lock(struct mutex *m)
{
    (void)m;
}   

void mutex_unlock(struct mutex *m)
{
    (void)m;
}   

void sim_thread_lock(void *me)
{
    (void)me;
}   

void * sim_thread_unlock(void)
{
    return (void*)1;
}