|
|
|
@ -155,6 +155,8 @@
|
|
|
|
(define-error 'tacc-error "Generic error from the tacc-timer module" 'error)
|
|
|
|
(define-error 'tacc-error "Generic error from the tacc-timer module" 'error)
|
|
|
|
(define-error 'tacc-error-illegal-buffer-state
|
|
|
|
(define-error 'tacc-error-illegal-buffer-state
|
|
|
|
"Precondition failed, the timer buffer is in an invalid state" 'tacc-error)
|
|
|
|
"Precondition failed, the timer buffer is in an invalid state" 'tacc-error)
|
|
|
|
|
|
|
|
(define-error 'tacc-dirty-state
|
|
|
|
|
|
|
|
"Precondition failed, tacc state wasn't clean" 'tacc-error)
|
|
|
|
(define-error 'tacc-error-serialization-registered
|
|
|
|
(define-error 'tacc-error-serialization-registered
|
|
|
|
"Failed to register a serialization, serializations must have unique names"
|
|
|
|
"Failed to register a serialization, serializations must have unique names"
|
|
|
|
'tacc-error)
|
|
|
|
'tacc-error)
|
|
|
|
@ -332,22 +334,22 @@ Note, if there is no tacc-buffer then you shouldn't be touching tacc-info"
|
|
|
|
(if (tacc-live-state?)
|
|
|
|
(if (tacc-live-state?)
|
|
|
|
t
|
|
|
|
t
|
|
|
|
;; Timer running without reason in logic
|
|
|
|
;; Timer running without reason in logic
|
|
|
|
(signal 'tacc-error-illegal-buffer-state (tacc-buffer)))
|
|
|
|
(signal 'tacc-error-illegal-buffer-state tacc-timer))
|
|
|
|
(if (tacc-session-state?)
|
|
|
|
(if (tacc-session-state?)
|
|
|
|
t
|
|
|
|
t
|
|
|
|
;; Buffer is live without reason in logic
|
|
|
|
;; Buffer is live without reason in logic
|
|
|
|
(signal 'tacc-error-illegal-buffer-state (tacc-buffer))))
|
|
|
|
(signal 'tacc-error-illegal-buffer-state (tacc-buffer))))
|
|
|
|
;; We shouldn't be calling this when the buffer is dead
|
|
|
|
;; We shouldn't be calling this when the buffer is dead
|
|
|
|
(signal 'tacc-error-illegal-buffer-state (tacc-buffer))))
|
|
|
|
(signal 'tacc-error-illegal-buffer-state "No buffer")))
|
|
|
|
|
|
|
|
|
|
|
|
(defun tacc-cleanup-invariant ()
|
|
|
|
(defun tacc-cleanup-invariant ()
|
|
|
|
"Returns t if tacc is in a cleaned up state, signals an error otherwise"
|
|
|
|
"Returns t if tacc is in a cleaned up state, signals an error otherwise"
|
|
|
|
(if (bufferp (tacc-buffer))
|
|
|
|
(if (bufferp (tacc-buffer))
|
|
|
|
(signal 'tacc-dirty-state (tacc-buffer))
|
|
|
|
(signal 'tacc-error-dirty-state (tacc-buffer))
|
|
|
|
(if (tacc-live?)
|
|
|
|
(if (tacc-live?)
|
|
|
|
(signal 'tacc-dirty-state tacc-timer)
|
|
|
|
(signal 'tacc-error-dirty-state tacc-timer)
|
|
|
|
(if (tacc-session?)
|
|
|
|
(if (tacc-session?)
|
|
|
|
(signal 'tacc-dirty-state tacc-info)
|
|
|
|
(signal 'tacc-error-dirty-state tacc-info)
|
|
|
|
t))))
|
|
|
|
t))))
|
|
|
|
|
|
|
|
|
|
|
|
;; 05.3 Predicates and helpers
|
|
|
|
;; 05.3 Predicates and helpers
|
|
|
|
|