Annotation of qemu/roms/SLOF/slof/fs/quiesce.fs, revision 1.1

1.1     ! root        1: \ *****************************************************************************
        !             2: \ * Copyright (c) 2004, 2008 IBM Corporation
        !             3: \ * All rights reserved.
        !             4: \ * This program and the accompanying materials
        !             5: \ * are made available under the terms of the BSD License
        !             6: \ * which accompanies this distribution, and is available at
        !             7: \ * http://www.opensource.org/licenses/bsd-license.php
        !             8: \ *
        !             9: \ * Contributors:
        !            10: \ *     IBM Corporation - initial implementation
        !            11: \ ****************************************************************************/
        !            12: 
        !            13: 
        !            14: 10 CONSTANT quiesce-xt#
        !            15: 
        !            16: \ The array with the quiesce execution tokens:
        !            17: CREATE quiesce-xts quiesce-xt# cells allot
        !            18: quiesce-xts quiesce-xt# cells erase
        !            19: 
        !            20: 
        !            21: \ Add a token to the quiesce execution token array:
        !            22: : add-quiesce-xt  ( xt -- )
        !            23:    quiesce-xt# 0 DO
        !            24:       quiesce-xts I cells +    ( xt arrayptr )
        !            25:       dup @ 0=                 ( xt arrayptr true|false )
        !            26:       IF
        !            27:          ! UNLOOP EXIT
        !            28:       ELSE                     ( xt arrayptr )
        !            29:          over swap             ( xt xt arrayptr )
        !            30:          @ =                   \ xt already stored ?
        !            31:          IF
        !            32:             drop UNLOOP EXIT
        !            33:          THEN                  ( xt )
        !            34:       THEN
        !            35:    LOOP
        !            36:    drop                        ( xt -- )
        !            37:    ." Warning: quiesce xt list is full." cr
        !            38: ;
        !            39: 
        !            40: 
        !            41: \ The quiesce call asserts that the firmware and all hardware
        !            42: \ is in a sane state (e.g. assert that no background DMA is
        !            43: \ running anymore)
        !            44: : quiesce  ( -- )
        !            45:    quiesce-xt# 0 DO
        !            46:       quiesce-xts I cells +    ( arrayptr )
        !            47:       @ dup IF                 ( xt )
        !            48:          EXECUTE
        !            49:       ELSE
        !            50:          drop UNLOOP EXIT
        !            51:       THEN
        !            52:    LOOP
        !            53: ;
        !            54: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.