Make wait_directory_event a system call
authorcoderain <coderain@sdf.org>
Fri, 21 Jul 2017 05:14:03 +0000 (07:14 +0200)
committercoderain <coderain@sdf.org>
Fri, 21 Jul 2017 05:14:03 +0000 (07:14 +0200)
kernel/include/filesystem.h
kernel/include/syscalls.h
kernel/src/syscalls.c

index 8d3c7410e9e97274e606b85c6e9918019049e90d..f0c010d3ceb2f06d14e8f29de61d6e2a152f8cc2 100644 (file)
@@ -167,6 +167,7 @@ dword_t read_file(handle_t handle, void *buffer, qword_t offset, size_t size, si
 dword_t write_file(handle_t handle, const void *buffer, qword_t offset, size_t size, size_t *bytes_written);
 dword_t mount(const char *device, const char *mountpoint, const char *filesystem, dword_t flags);
 dword_t unmount(const char *device);
+dword_t wait_directory_event(handle_t handle, dword_t event_mask, file_event_t *buffer, size_t size, dword_t timeout);
 void report_filesystem_event(const char *path, dword_t type);
 
 #endif
index e05958d7dae40839dcf1bdc8f70034a2e750722e..c18a763f914914c1ace528fa0e2aad347564598b 100644 (file)
@@ -80,6 +80,7 @@ typedef enum
     SYSCALL_TERMINATE_THREAD,
     SYSCALL_UNCOMMIT_MEMORY,
     SYSCALL_UNMOUNT,
+    SYSCALL_WAIT_DIRECTORY_EVENT,
     SYSCALL_WAIT_PROCESS,
     SYSCALL_WAIT_SEMAPHORE,
     SYSCALL_WAIT_THREAD,
index e56bf7f7113b991b443baaec93fe769a51237a66..56e4e9377f293d40baa0c3684494cc8fb75b8d8d 100644 (file)
@@ -85,6 +85,7 @@ const void *service_table[] =
     &terminate_thread,
     &uncommit_memory,
     &unmount,
+    &wait_directory_event,
     &wait_process,
     &wait_semaphore_by_handle,
     &wait_thread,