diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-06-27 19:19:13 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-06-27 19:19:13 +0000 |
commit | 0100a6e5bea180aa938ad618d7ed853dd0b7ed10 (patch) | |
tree | fd7f58e3f4eea5a4bfad0509dad6619fc01a54f5 /console/display.c | |
parent | 38a8adf4ff9c0ecfbb4adb432feeff58e5058180 (diff) | |
download | hurd-0100a6e5bea180aa938ad618d7ed853dd0b7ed10.tar.gz hurd-0100a6e5bea180aa938ad618d7ed853dd0b7ed10.tar.bz2 hurd-0100a6e5bea180aa938ad618d7ed853dd0b7ed10.zip |
hurd/
2002-06-26 Marcus Brinkmann <marcus@gnu.org>
* 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 <marcus@gnu.org>
* 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 <marcus@gnu.org>
* 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.
Diffstat (limited to 'console/display.c')
-rw-r--r-- | console/display.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/console/display.c b/console/display.c index a418ca73..7765af8e 100644 --- a/console/display.c +++ b/console/display.c @@ -291,12 +291,15 @@ static struct port_class *notify_class; /* SimpleRoutine file_changed */ kern_return_t -nowait_file_changed (mach_port_t notify_port, file_changed_type_t change, +nowait_file_changed (mach_port_t notify_port, natural_t tickno, + file_changed_type_t change, off_t start, off_t end, mach_port_t notify) { typedef struct { mach_msg_header_t Head; + mach_msg_type_t ticknoType; + natural_t tickno; mach_msg_type_t changeType; file_changed_type_t change; mach_msg_type_t startType; @@ -309,7 +312,17 @@ nowait_file_changed (mach_port_t notify_port, file_changed_type_t change, Request In; } Mess; register Request *InP = &Mess.In; - + + static const mach_msg_type_t ticknoType = { + /* msgt_name = */ 2, + /* msgt_size = */ 32, + /* msgt_number = */ 1, + /* msgt_inline = */ TRUE, + /* msgt_longform = */ FALSE, + /* msgt_deallocate = */ FALSE, + /* msgt_unused = */ 0 + }; + static const mach_msg_type_t changeType = { /* msgt_name = */ 2, /* msgt_size = */ 32, @@ -340,6 +353,8 @@ nowait_file_changed (mach_port_t notify_port, file_changed_type_t change, /* msgt_unused = */ 0 }; + InP->ticknoType = ticknoType; + InP->tickno = tickno; InP->changeType = changeType; InP->change = change; InP->startType = startType; @@ -356,11 +371,11 @@ nowait_file_changed (mach_port_t notify_port, file_changed_type_t change, if (notify == MACH_PORT_NULL) return mach_msg (&InP->Head, MACH_SEND_MSG | MACH_MSG_OPTION_NONE, - 48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, + 56, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); else return mach_msg (&InP->Head, MACH_SEND_MSG | MACH_SEND_NOTIFY, - 48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, + 56, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, notify); } @@ -435,7 +450,7 @@ do_mach_notify_msg_accepted (mach_port_t notify, mach_port_t send) /* A request was desired while we were blocking. Send it now and stay in pending queue. */ req->pending = 0; - err = nowait_file_changed (req->port, FILE_CHANGED_WRITE, -1, -1, + err = nowait_file_changed (req->port, 0, FILE_CHANGED_WRITE, -1, -1, notify); if (err && err != MACH_SEND_WILL_NOTIFY) { @@ -484,7 +499,7 @@ display_notice_changes (display_t display, mach_port_t notify) struct modreq *req; mutex_lock (&display->lock); - err = nowait_file_changed (notify, FILE_CHANGED_NULL, 0, 0, MACH_PORT_NULL); + err = nowait_file_changed (notify, 0, FILE_CHANGED_NULL, 0, 0, MACH_PORT_NULL); if (err) { mutex_unlock (&display->lock); @@ -523,7 +538,7 @@ display_notice_filechange (display_t display) { req = *preq; - err = nowait_file_changed (req->port, FILE_CHANGED_WRITE, -1, -1, + err = nowait_file_changed (req->port, 0, FILE_CHANGED_WRITE, -1, -1, notify_port); if (err) { |