[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libcons: Opening a vcons multiple times

From: Wolfgang Jaehrling
Subject: libcons: Opening a vcons multiple times
Date: Wed, 6 Nov 2002 13:26:57 +0100
User-agent: Mutt/1.3.28i


`libcons/vcons-close.c:37' says that ``The same virtual console should
never be opened twice''.  Some part of the code seem to take into
account that it might be opened multiple times, though:

- `cons_vcons_open ()' does not set `vcons_entry->vcons' to `*r_vcons'
  itself, but leaves this to its callers (which are `cons_switch ()'
  and `console-client/console.c:cons_vcons_add ()').

- `cons_switch ()' locks `*r_vcons' either with a call to
  `cons_vcons_open ()', or (in `libcons/cons-switch.c:77') directly.
  The ``either ... or ...'' is what gives me the impression that it
  expects that it might be opened more than once.  Hoewever, in any
  case it gets unlocked at `console-client/console.c:86' indirectly
  through a call to `cons_vcons_close ()'.

Or are there other reasons for these behaviours?


PS: The comment at `console-client/console.c:62' ends in the middle of
a sentence.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]