Author: wmb Date: Mon Jan 23 18:56:23 2012 New Revision: 2847 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2847
Log: Kernel - in "including", ensure that include-exit-hook is called if an abort happens during the file loading operation.
Modified: forth/kernel/kernel.fth
Modified: forth/kernel/kernel.fth ============================================================================== --- forth/kernel/kernel.fth Mon Jan 23 18:56:19 2012 (r2846) +++ forth/kernel/kernel.fth Mon Jan 23 18:56:23 2012 (r2847) @@ -3021,13 +3021,17 @@ : $abort-include ( error# filename$ -- ) 2drop throw ; ' $abort-include is $open-error
-: included ( adr len -- ) - include-hook +: (included) ( adr len -- ) r/o open-file ?dup if opened-filename 2@ $open-error then ( fid ) include-file - include-exit-hook +; +: included ( adr len -- ) + include-hook ( adr len ) + ['] (included) catch ( error# ) + include-exit-hook ( error# ) + throw ; : including ( "name" -- ) safe-parse-word included ; : fl ( "name" -- ) including ;
openfirmware@openfirmware.info