about summary refs log tree commit diff
path: root/pkgs/games/build-support/build-sandbox/src/path-cache.h
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-10-03 23:10:21 +0200
committeraszlig <aszlig@redmoonstudios.org>2017-10-03 23:41:43 +0200
commit175e9328bf9d403c70a0fd3721d1839538558422 (patch)
tree8bc2d87b5616992c3fcab76699e8f1ec54c4dc33 /pkgs/games/build-support/build-sandbox/src/path-cache.h
parentb7e0a4c55944b266f2a6c2aa65d093eb31dcc3ad (diff)
pkgs/sandbox: Implement a path cache
First of all this is to bring down the amount of syscalls we're doing
but it's also useful to avoid errors when we try to mount a path over an
already mounted path.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/games/build-support/build-sandbox/src/path-cache.h')
-rw-r--r--pkgs/games/build-support/build-sandbox/src/path-cache.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/games/build-support/build-sandbox/src/path-cache.h b/pkgs/games/build-support/build-sandbox/src/path-cache.h
new file mode 100644
index 00000000..368f8d17
--- /dev/null
+++ b/pkgs/games/build-support/build-sandbox/src/path-cache.h
@@ -0,0 +1,10 @@
+#ifndef _PATH_CACHE_H
+#define _PATH_CACHE_H
+
+typedef void *path_cache;
+
+path_cache new_path_cache(void);
+void free_path_cache(path_cache pc);
+bool cache_path(path_cache pc, const char *path);
+
+#endif