Re: Can't understand why these exceptions occur...



Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx> wrote in
news:_Sf0k.28$sf2.27@xxxxxxxxxxxx:

<snip>
You need to fix your logic a bit here.

Would you care to elaborate why?

I assume the LoadCache is where you initiate the
buffer file.

Partly. I try to read the buffer here, if there is no buffer, nothing needs
to be read.

You need to create the file... if it does not
yet exist!.

Why? I'm only reading a file if one exists?

AssignFile(cache, CacheName);
If FileExist(cacheName) then
Begin
.....
as you were;
End else
Begin
// Clear all buffers to indicate an empty state.
Rewrite(Cache); // < Thats the magic call! :)
End;
CloseFile(Cache);

etc..
Reset assumes an Existing file, Rewrite just starts a
new file and replaces and existing one.

Yes, but the reset is only executed if the file exists, so I don't see the
problem here...

Thanks for the reply!

Ikke
.



Relevant Pages

  • my serial interface is "reset" - ??? hehe
    ... I have a point to point 2600 circuit that now is showing a "reset" on ... here is a show int serial1/1 - anyone point me at what I should be trying to ... minute output rate 0 bits/sec, 0 packets/sec ... output buffer failures, ...
    (comp.dcom.sys.cisco)
  • Re: experimental 100% lock-free bounded pointer queue code...
    ... Here is a code-snippet of the buffer algorithm itself: ... CAS's have release semantics for the TryPop function.... ... // setup new value with reset flag ... // setup anchor to reset and release the spinlock ...
    (comp.programming.threads)
  • Re: ftrace behaviour (was: [PATCH] ftrace: introduce tracing_reset_online_cpus() helper)
    ... to implement Frederic's request to reset the buffer on enabled. ... quick but requires locks and mutexes to be taken. ... this option is local to the ring buffer code. ... It just a global flag to stop tracing. ...
    (Linux-Kernel)
  • [git pull] tracing fixes
    ... trace: stop all recording to ring buffer on ftrace_dump ... reset timestamps when ring buffer is reset ... switch { ...
    (Linux-Kernel)
  • Re: 2.6.10-mm3: lseek broken on /proc/self/maps
    ... Jeremy Fitzhardinge wrote: ... f_version is not reset by seq_lseek as done by generic_lseek. ... > to read the whole buffer. ... > continues from where the previous one (before the lseek) left off. ...
    (Linux-Kernel)