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

Diff of /hurd/console/console.c

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

revision 1.1 by marcus, Sun Mar 17 18:04:49 2002 UTC revision 1.2 by marcus, Sun Jun 2 02:36:10 2002 UTC
# Line 161  vcons_lookup (cons_t cons, int id, int c Line 161  vcons_lookup (cons_t cons, int id, int c
161                *r_vcons = previous_cons;                *r_vcons = previous_cons;
162                return 0;                return 0;
163              }              }
164            else if (!create)          }
165              {        else if (!create)
166                mutex_unlock (&cons_list_lock);          {
167                return ESRCH;            mutex_unlock (&cons_list_lock);
168              }            return ESRCH;
169          }          }
170      }      }
171    else    else
# Line 236  void Line 236  void
236  vcons_release (vcons_t vcons)  vcons_release (vcons_t vcons)
237  {  {
238    mutex_lock (&cons_list_lock);    mutex_lock (&cons_list_lock);
239    if (--vcons->refcnt)    if (!--vcons->refcnt)
240      {      {
241        /* As we keep a reference for all input focus groups pointing to        /* As we keep a reference for all input focus groups pointing to
242           the virtual console, and a reference for the active console,           the virtual console, and a reference for the active console,
# Line 250  vcons_release (vcons_t vcons) Line 250  vcons_release (vcons_t vcons)
250          vcons->prev->next = vcons->next;          vcons->prev->next = vcons->next;
251        if (vcons->next)        if (vcons->next)
252          vcons->next->prev = vcons->prev;          vcons->next->prev = vcons->prev;
253          if (!vcons->prev && !vcons->next)
254            vcons->cons->vcons_list = NULL;
255        vcons->cons->vcons_length--;        vcons->cons->vcons_length--;
256        vcons->cons->refcnt--;        vcons->cons->refcnt--;
257        free (vcons);        free (vcons);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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