Re: [NTLK] ATA News - card removal

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Sun Jun 24 2001 - 02:15:17 PDT


> How does the code for brutal removal of linear flash cards work?

First, the linear space is mapped twice in memory to have one copy
remaining if the card is removed (even if there is no card there).

>Is it some low-level interrupt level piece of C++ buried somewhere?

Exactly. The method Emergency Shutdown of the TCHMemModem object (the
card handler for linear and modem cards) is called.
There are several cases in fact:
a/ the card server under some circumstances I have to find (and
reproduce) shows Newton still needs the card foo. I know exactly
which function shows this dialog, but I cannot call it directly
because (a) it's not at the same place in every Newton my software
should run on (b) the alert isn't really the problem, instead, it's
the re-insertion that should work.
b/ under some other circumstances, the card server tries to unmount
all the stores on the card (in the ROM, you can have up to 4 stores
per linear card, although this isn't totally implemented). It tries
to remove every package until one asks for something on the card
(hence the two copies of the linear space, at this point, the PCMCIA
virtual space is no longer available), there is some mechanism and
the Newton asks for the card. If no package requires the card to be
reinserted, it's just unmounted and you don't have to reinsert it.

What is sure is that I will very probably not support non-reinsertion
brutal removal of the card. What I might code is that if the card is
brutally removed, there will be the message Newton still needs the
card, and then the "you can remove the card message".

>(I notice
>that the box asking for the card back doesn't look like a normal NS box, so
>I assume it's made somewhere below the NS layer)

In fact, it's made in another task. The NS task there is blocked at
this point, I don't know exactly how yet.

Paul

-- 
Home page: http://www.kallisys.com/
Newton-powered WebServer: http://newt.dyndns.org:8080/
--
This is the Newtontalk mailinglist - http://www.newtontalk.net
To unsubscribe or manage: visit the above link or
	mailto:newtontalk-request_at_newtontalk.net?Subject=unsubscribe


This archive was generated by hypermail 2.1.5 : Sat Mar 08 2003 - 11:37:03 PST