/[hurd]/hurd/console/display.c
ViewVC logotype

Diff of /hurd/console/display.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by marcus, Tue Jun 25 15:49:11 2002 UTC revision 1.13 by marcus, Thu Jun 27 19:19:13 2002 UTC
# Line 291  static struct port_class *notify_class; Line 291  static struct port_class *notify_class;
291    
292  /* SimpleRoutine file_changed */  /* SimpleRoutine file_changed */
293  kern_return_t  kern_return_t
294  nowait_file_changed (mach_port_t notify_port, file_changed_type_t change,  nowait_file_changed (mach_port_t notify_port, natural_t tickno,
295                         file_changed_type_t change,
296                       off_t start, off_t end, mach_port_t notify)                       off_t start, off_t end, mach_port_t notify)
297  {  {
298    typedef struct    typedef struct
299    {    {
300      mach_msg_header_t Head;      mach_msg_header_t Head;
301        mach_msg_type_t ticknoType;
302        natural_t tickno;
303      mach_msg_type_t changeType;      mach_msg_type_t changeType;
304      file_changed_type_t change;      file_changed_type_t change;
305      mach_msg_type_t startType;      mach_msg_type_t startType;
# Line 309  nowait_file_changed (mach_port_t notify_ Line 312  nowait_file_changed (mach_port_t notify_
312      Request In;      Request In;
313    } Mess;    } Mess;
314    register Request *InP = &Mess.In;    register Request *InP = &Mess.In;
315      
316      static const mach_msg_type_t ticknoType = {
317        /* msgt_name = */           2,
318        /* msgt_size = */           32,
319        /* msgt_number = */         1,
320        /* msgt_inline = */         TRUE,
321        /* msgt_longform = */       FALSE,
322        /* msgt_deallocate = */     FALSE,
323        /* msgt_unused = */         0
324      };  
325    
326    static const mach_msg_type_t changeType = {    static const mach_msg_type_t changeType = {
327      /* msgt_name = */           2,      /* msgt_name = */           2,
328      /* msgt_size = */           32,      /* msgt_size = */           32,
# Line 340  nowait_file_changed (mach_port_t notify_ Line 353  nowait_file_changed (mach_port_t notify_
353      /* msgt_unused = */         0      /* msgt_unused = */         0
354    };    };
355    
356      InP->ticknoType = ticknoType;
357      InP->tickno = tickno;
358    InP->changeType = changeType;    InP->changeType = changeType;
359    InP->change = change;    InP->change = change;
360    InP->startType = startType;    InP->startType = startType;
# Line 356  nowait_file_changed (mach_port_t notify_ Line 371  nowait_file_changed (mach_port_t notify_
371    
372    if (notify == MACH_PORT_NULL)    if (notify == MACH_PORT_NULL)
373      return mach_msg (&InP->Head, MACH_SEND_MSG | MACH_MSG_OPTION_NONE,      return mach_msg (&InP->Head, MACH_SEND_MSG | MACH_MSG_OPTION_NONE,
374                       48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,                       56, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,
375                       MACH_PORT_NULL);                       MACH_PORT_NULL);
376    else    else
377      return mach_msg (&InP->Head, MACH_SEND_MSG | MACH_SEND_NOTIFY,      return mach_msg (&InP->Head, MACH_SEND_MSG | MACH_SEND_NOTIFY,
378                       48, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,                       56, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,
379                       notify);                       notify);
380  }  }
381    
# Line 435  do_mach_notify_msg_accepted (mach_port_t Line 450  do_mach_notify_msg_accepted (mach_port_t
450        /* A request was desired while we were blocking.  Send it now        /* A request was desired while we were blocking.  Send it now
451           and stay in pending queue.  */           and stay in pending queue.  */
452        req->pending = 0;        req->pending = 0;
453        err = nowait_file_changed (req->port, FILE_CHANGED_WRITE, -1, -1,        err = nowait_file_changed (req->port, 0, FILE_CHANGED_WRITE, -1, -1,
454                                   notify);                                   notify);
455        if (err && err != MACH_SEND_WILL_NOTIFY)        if (err && err != MACH_SEND_WILL_NOTIFY)
456          {          {
# Line 484  display_notice_changes (display_t displa Line 499  display_notice_changes (display_t displa
499    struct modreq *req;    struct modreq *req;
500    
501    mutex_lock (&display->lock);    mutex_lock (&display->lock);
502    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);
503    if (err)    if (err)
504      {      {
505        mutex_unlock (&display->lock);        mutex_unlock (&display->lock);
# Line 523  display_notice_filechange (display_t dis Line 538  display_notice_filechange (display_t dis
538      {      {
539        req = *preq;        req = *preq;
540    
541        err = nowait_file_changed (req->port, FILE_CHANGED_WRITE, -1, -1,        err = nowait_file_changed (req->port, 0, FILE_CHANGED_WRITE, -1, -1,
542                                   notify_port);                                   notify_port);
543        if (err)        if (err)
544          {          {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26