<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 4, 2012, at 3:30 PM, <a href="mailto:openbios-request@openbios.org">openbios-request@openbios.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Message: 5<br>Date: Tue, 25 Sep 2012 16:03:20 +0200<br>From: Segher Boessenkool <<a href="mailto:segher@kernel.crashing.org">segher@kernel.crashing.org</a>><br>To: The OpenBIOS Mailinglist <<a href="mailto:openbios@openbios.org">openbios@openbios.org</a>><br>Subject: Re: [OpenBIOS] [PATCH] Adds the get-time word to the<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>dictionary.<span class="Apple-tab-span" style="white-space: pre; ">      </span>Used to obtain the current time.<br>Message-ID: <<a href="mailto:21F2BBE0-1211-44F5-8C20-8148431F682A@kernel.crashing.org">21F2BBE0-1211-44F5-8C20-8148431F682A@kernel.crashing.org</a>><br>Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<br><br><blockquote type="cite">: get-time<br></blockquote><blockquote type="cite">  " rtc" open-dev                   ( ihandle )<br></blockquote><blockquote type="cite">  ?dup 0= if<br></blockquote><blockquote type="cite">     cr abort" Sorry but no rtc node is present on this system"<br></blockquote><blockquote type="cite">  then                              ( ihandle )<br></blockquote><blockquote type="cite"><blockquote type="cite">r " get-time" r@ $call-method    ( <returned args - 6 of em?  <br></blockquote></blockquote><blockquote type="cite">Yikes > )<br></blockquote><blockquote type="cite">  r> close-dev                      ( <returned args> )<br></blockquote><blockquote type="cite">;<br></blockquote><br>: get-time<br>  s" rtc" s" get-time" execute-device-method<br>  0= ABORT" Sorry but no rtc node is present on this system" ;<br><br>(note that ABORT" takes a flag as input), but better is<br><br>: get-time<br>  s" rtc" s" get-time" execute-device-method<br>  0= IF fake-some-sort-of-plausible-time-1970-or-so THEN ;<br><br>which is pretty much what Apple's OF does.  execute-device-method<br>is not the same thing as open-dev followed by $call-method: it<br>does not call "open" in the instance for the device itself (you<br>only need that for devices that can have multiple clients at the<br>same time and need to keep state for each client; or when instead<br>you need to prevent concurrent access from multiple clients, by<br>having the second open fail).<br><br><br>Segher<br></span></blockquote><br></div><div><br></div><div>I honestly see no reason to replace open-dev with execute-device-method. My original patch is just fine.</div><br></body></html>