From 0100a6e5bea180aa938ad618d7ed853dd0b7ed10 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 27 Jun 2002 19:19:13 +0000 Subject: hurd/ 2002-06-26 Marcus Brinkmann * fs_notify.defs: Add MsgOption for send timeout. (dir_changed): Changed to simpleroutine. Change type of first argument to fs_notify_t. Add TICKNO argument. (file_changed): Likewise. * hurd_types.defs (fs_notify_t): New type. * hurd_types.h (fs_notify_t): Likewise. libdiskfs/ 2002-06-26 Marcus Brinkmann * Makefile (DIST_FILES): Variable removed. (MIGSTUBS): Use fs_notifyUser.o, not ourfs_notifyUser.o. * ourfs_notify.defs: File removed. * diskfs.h (struct node): New members DIRMOD_TICK and FILEMOD_TICK. * node-make.c (diskfs_make_node): Initialize DIRMOD_TICK and FILEMOD_TICK. * dir-chg.c: Include "fs_notify_U.h" instead "ourfs_notify_U.h". (diskfs_S_dir_notice_changes): Use new dir_changed invocation instead nowait_dir_changed. (diskfs_notice_dirchange): Likewise. Increase tick number. Ignore send timeout error. * file-chg.c: Include "fs_notify_U.h" instead "ourfs_notify_U.h". (diskfs_S_file_notice_changes): Use new file_changed invocation instead nowait_file_changed. (diskfs_notice_filechange): Likewise. Increase tick number. Ignore send timeout error. console/ 2002-06-27 Marcus Brinkmann * Makefile (MIGSTUBS): Add fs_notifyUser.o. (MIGSFLAGS): New variable. * console.c: Include "fs_notify_U.h". (struct modreq): New structure. (struct cons): New members DIRMOD_REQS and DIRMOD_TICK. (cons_notice_dirchange): New function. (vcons_lookup): Call cons_notice_dirchange. (netfs_S_dir_notice_changes): New function. (main): Initialize new members in CONS. * display.c (nowait_file_changed): Update to new interface (new argument TICKNO). (do_mach_notify_msg_accepted): Call nowait_file_changed with new argument. (display_notice_changes): Likewise. (display_notice_filechange): Likewise. --- libdiskfs/file-chg.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'libdiskfs/file-chg.c') diff --git a/libdiskfs/file-chg.c b/libdiskfs/file-chg.c index e9535591..22edc69c 100644 --- a/libdiskfs/file-chg.c +++ b/libdiskfs/file-chg.c @@ -17,7 +17,7 @@ #include "priv.h" #include "fs_S.h" -#include "ourfs_notify_U.h" +#include "fs_notify_U.h" kern_return_t diskfs_S_file_notice_changes (struct protid *cred, mach_port_t notify) @@ -31,7 +31,7 @@ diskfs_S_file_notice_changes (struct protid *cred, mach_port_t notify) np = cred->po->np; mutex_lock (&np->lock); - err = nowait_file_changed (notify, FILE_CHANGED_NULL, 0, 0); + err = file_changed (notify, np->filemod_tick, FILE_CHANGED_NULL, 0, 0); if (err) { mutex_unlock (&np->lock); @@ -51,14 +51,16 @@ diskfs_notice_filechange (struct node *dp, enum file_changed_type type, { error_t err; struct modreq **preq; - + + dp->filemod_tick++; preq = &dp->filemod_reqs; while (*preq) { struct modreq *req = *preq; - err = nowait_file_changed (req->port, type, start, end); - if (err) - { /* remove notify port */ + err = file_changed (req->port, dp->filemod_tick, type, start, end); + if (err && err != MACH_SEND_TIMED_OUT) + { + /* Remove notify port. */ *preq = req->next; mach_port_deallocate (mach_task_self (), req->port); free (req); -- cgit v1.2.3