Disabling Interrupts
Posted: Tue Apr 16, 2019 3:26 am
First, let me thank you for your patience answering my barrage of questions. Highly appreciated!
Here's the next... How "atomic" is SYSTEM.PUT as regards interference by interrupts? In particular:
Is the first line a safe way to disable the interrupt?
Here's the next... How "atomic" is SYSTEM.PUT as regards interference by interrupts? In particular:
Code: Select all
(* irqICER, irqISER, irqSCBit: the ICER, ISER and bit (a SET) corresponding to the interrupt *)
PROCEDURE* PutByte*(b: BYTE);
BEGIN
SYSTEM.PUT(irqICER, irqSCBit);
txnext := (txin + 1) MOD TxBufSize;
ASSERT(txnext # txout, Error.BufferOverflow);
txBuf[txin] := b;
txin := txnext;
SYSTEM.PUT(irqISER, irqSCBit)
END PutByte;