[squeak-dev] Adding fsync() call to the primitiveFileFlush prim ?

tim Rowledge tim at rowledge.org
Sat May 21 17:49:24 UTC 2016


The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don’t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don’t necessarily know to tell them to; lots of people doing their best with insufficient knowledge.

An interesting thing is that I ‘remembered’ that we flush files when closing them but in fact we don’t. The file flush primitive is barely used, so far as I can only really for stdio flushing. So adding a fsync call to the flush primitive would barely affect anything and I’d have to amend the Scratch file writing code to use it.

Is anyone using code that regularly flushes filestreams and might have a performance issue if an fsync were added?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: BOMB: Burn Out Memory Banks




More information about the Squeak-dev mailing list