Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2022-03-25 21:02:53 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-26 02:04:15 +0300
commit9dcba0ba08d0e843eda1f141c99c72e0aa67811f (patch)
tree8fadb67cc9682f65c3b5078ab4acac832bf832ee /fsmonitor--daemon.h
parentf67df2556f372f6095270bf870f32ff84def2e4b (diff)
fsmonitor--daemon: implement 'run' command
Implement `run` command to try to begin listening for file system events. This version defines the thread structure with a single fsmonitor_fs_listen thread to watch for file system events and a simple IPC thread pool to watch for connection from Git clients over a well-known named pipe or Unix domain socket. This commit does not actually do anything yet because the platform backends are still just stubs. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsmonitor--daemon.h')
-rw-r--r--fsmonitor--daemon.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/fsmonitor--daemon.h b/fsmonitor--daemon.h
new file mode 100644
index 0000000000..3009c1a83d
--- /dev/null
+++ b/fsmonitor--daemon.h
@@ -0,0 +1,34 @@
+#ifndef FSMONITOR_DAEMON_H
+#define FSMONITOR_DAEMON_H
+
+#ifdef HAVE_FSMONITOR_DAEMON_BACKEND
+
+#include "cache.h"
+#include "dir.h"
+#include "run-command.h"
+#include "simple-ipc.h"
+#include "thread-utils.h"
+
+struct fsmonitor_batch;
+struct fsmonitor_token_data;
+
+struct fsmonitor_daemon_backend_data; /* opaque platform-specific data */
+
+struct fsmonitor_daemon_state {
+ pthread_t listener_thread;
+ pthread_mutex_t main_lock;
+
+ struct strbuf path_worktree_watch;
+ struct strbuf path_gitdir_watch;
+ int nr_paths_watching;
+
+ struct fsmonitor_token_data *current_token_data;
+
+ int error_code;
+ struct fsmonitor_daemon_backend_data *backend_data;
+
+ struct ipc_server_data *ipc_server_data;
+};
+
+#endif /* HAVE_FSMONITOR_DAEMON_BACKEND */
+#endif /* FSMONITOR_DAEMON_H */