;;-*-Lisp-*- (in-package goal) ;; definition of type kernel-context (deftype kernel-context (basic) ((prevent-from-run process-mask) (require-for-run process-mask) (allow-to-run process-mask) (next-pid int32) (fast-stack-top pointer) (current-process process) (relocating-process basic) (relocating-min int32) (relocating-max int32) (relocating-offset int32) (low-memory-message symbol) ) ) ;; definition for method 3 of type kernel-context (defmethod inspect ((this kernel-context)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tprevent-from-run: ~D~%" (-> this prevent-from-run)) (format #t "~Trequire-for-run: ~D~%" (-> this require-for-run)) (format #t "~Tallow-to-run: ~D~%" (-> this allow-to-run)) (format #t "~Tnext-pid: ~D~%" (-> this next-pid)) (format #t "~Tfast-stack-top: #x~X~%" (-> this fast-stack-top)) (format #t "~Tcurrent-process: ~A~%" (-> this current-process)) (format #t "~Trelocating-process: ~A~%" (-> this relocating-process)) (format #t "~Trelocating-min: #x~X~%" (-> this relocating-min)) (format #t "~Trelocating-max: #x~X~%" (-> this relocating-max)) (format #t "~Trelocating-offset: ~D~%" (-> this relocating-offset)) (format #t "~Tlow-memory-message: ~A~%" (-> this low-memory-message)) this ) ;; definition of type thread (deftype thread (basic) ((name basic) (process process) (previous thread) (suspend-hook (function cpu-thread none)) (resume-hook (function cpu-thread none)) (pc pointer) (sp pointer) (stack-top pointer) (stack-size int32) ) (:methods (stack-size-set! (_type_ int) none) (thread-suspend (_type_) none) (thread-resume (_type_) none) ) ) ;; definition for method 3 of type thread (defmethod inspect ((this thread)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) (format #t "~Tprocess: ~A~%" (-> this process)) (format #t "~Tprevious: ~A~%" (-> this previous)) (format #t "~Tsuspend-hook: ~A~%" (-> this suspend-hook)) (format #t "~Tresume-hook: ~A~%" (-> this resume-hook)) (format #t "~Tpc: #x~X~%" (-> this pc)) (format #t "~Tsp: #x~X~%" (-> this sp)) (format #t "~Tstack-top: #x~X~%" (-> this stack-top)) (format #t "~Tstack-size: ~D~%" (-> this stack-size)) this ) ;; definition of type cpu-thread (deftype cpu-thread (thread) ((rreg uint64 7) (freg float 8) (stack uint8 :dynamic) ) (:methods (new (symbol type process symbol int pointer) _type_) ) ) ;; definition for method 3 of type cpu-thread (defmethod inspect ((this cpu-thread)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) (format #t "~Tprocess: ~A~%" (-> this process)) (format #t "~Tprevious: ~A~%" (-> this previous)) (format #t "~Tsuspend-hook: ~A~%" (-> this suspend-hook)) (format #t "~Tresume-hook: ~A~%" (-> this resume-hook)) (format #t "~Tpc: #x~X~%" (-> this pc)) (format #t "~Tsp: #x~X~%" (-> this sp)) (format #t "~Tstack-top: #x~X~%" (-> this stack-top)) (format #t "~Tstack-size: ~D~%" (-> this stack-size)) (format #t "~Trreg[8] @ #x~X~%" (-> this rreg)) (format #t "~Tfreg[6] @ #x~X~%" (&-> this freg 2)) (format #t "~Tstack[0] @ #x~X~%" (-> this stack)) this ) ;; definition of type dead-pool (deftype dead-pool (process-tree) () (:methods (new (symbol type int int basic) _type_) (get-process (_type_ type int) process) (return-process (_type_ process) none) ) ) ;; definition for method 3 of type dead-pool (defmethod inspect ((this dead-pool)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) (format #t "~Tmask: ~D~%" (-> this mask)) (format #t "~Tparent: #x~X~%" (-> this parent)) (format #t "~Tbrother: #x~X~%" (-> this brother)) (format #t "~Tchild: #x~X~%" (-> this child)) (format #t "~Tppointer: #x~X~%" (-> this ppointer)) (format #t "~Tself: ~A~%" (-> this self)) this ) ;; definition of type dead-pool-heap-rec (deftype dead-pool-heap-rec (structure) ((process process) (prev dead-pool-heap-rec) (next dead-pool-heap-rec) ) :pack-me ) ;; definition for method 3 of type dead-pool-heap-rec (defmethod inspect ((this dead-pool-heap-rec)) (format #t "[~8x] ~A~%" this 'dead-pool-heap-rec) (format #t "~Tprocess: ~A~%" (-> this process)) (format #t "~Tprev: #~%" (-> this prev)) (format #t "~Tnext: #~%" (-> this next)) this ) ;; definition of type dead-pool-heap (deftype dead-pool-heap (dead-pool) ((allocated-length int32) (compact-time uint32) (compact-count-targ uint32) (compact-count uint32) (fill-percent float) (first-gap dead-pool-heap-rec) (first-shrink dead-pool-heap-rec) (heap kheap :inline) (alive-list dead-pool-heap-rec :inline) (last dead-pool-heap-rec :overlay-at (-> alive-list prev)) (dead-list dead-pool-heap-rec :inline) (process-list dead-pool-heap-rec :inline :dynamic) ) (:methods (new (symbol type basic int int) _type_) (compact (dead-pool-heap int) none) (shrink-heap (dead-pool-heap process) dead-pool-heap) (churn (dead-pool-heap int) none) (memory-used (dead-pool-heap) int) (memory-total (dead-pool-heap) int) (gap-size (dead-pool-heap dead-pool-heap-rec) int) (gap-location (dead-pool-heap dead-pool-heap-rec) pointer) (find-gap (dead-pool-heap dead-pool-heap-rec) dead-pool-heap-rec) (find-gap-by-size (dead-pool-heap int) dead-pool-heap-rec) (memory-free (dead-pool-heap) int) (compact-time (dead-pool-heap) uint) ) ) ;; definition for method 3 of type dead-pool-heap ;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this dead-pool-heap)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) (format #t "~Tmask: ~D~%" (-> this mask)) (format #t "~Tparent: #x~X~%" (-> this parent)) (format #t "~Tbrother: #x~X~%" (-> this brother)) (format #t "~Tchild: #x~X~%" (-> this child)) (format #t "~Tppointer: #x~X~%" (-> this ppointer)) (format #t "~Tself: ~A~%" (-> this self)) (format #t "~Tallocated-length: ~D~%" (-> this allocated-length)) (format #t "~Tcompact-time: ~D~%" (-> this compact-time)) (format #t "~Tcompact-count-targ: ~D~%" (-> this compact-count-targ)) (format #t "~Tcompact-count: ~D~%" (-> this compact-count)) (format #t "~Tfill-percent: ~f~%" (-> this fill-percent)) (format #t "~Tfirst-gap: #~%" (-> this first-gap)) (format #t "~Tfirst-shrink: #~%" (-> this first-shrink)) (format #t "~Theap: #~%" (-> this heap)) (format #t "~Talive-list: #~%" (-> this alive-list)) (format #t "~Tlast: #~%" (-> this alive-list prev)) (format #t "~Tdead-list: #~%" (-> this dead-list)) (format #t "~Tprocess-list[0] @ #x~X~%" (-> this process-list)) this ) ;; definition of type catch-frame (deftype catch-frame (stack-frame) ((sp int32) (ra int32) (freg float 10) (rreg uint128 7) ) (:methods (new (symbol type symbol function (pointer uint64)) object) ) ) ;; definition for method 3 of type catch-frame (defmethod inspect ((this catch-frame)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) (format #t "~Tnext: ~A~%" (-> this next)) (format #t "~Tsp: #x~X~%" (-> this sp)) (format #t "~Tra: #x~X~%" (-> this ra)) (format #t "~Tfreg[6] @ #x~X~%" (-> this freg)) (format #t "~Trreg[8] @ #x~X~%" (&-> this freg 7)) this ) ;; definition of type protect-frame (deftype protect-frame (stack-frame) ((exit (function object)) ) (:methods (new (symbol type (function object)) protect-frame) ) ) ;; definition for method 3 of type protect-frame (defmethod inspect ((this protect-frame)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) (format #t "~Tnext: ~A~%" (-> this next)) (format #t "~Texit: ~A~%" (-> this exit)) this ) ;; definition of type handle (deftype handle (uint64) ((process (pointer process) :offset 0 :size 32) (pid int32 :offset 32 :size 32) (u64 uint64 :offset 0 :size 64) ) ) ;; definition for method 3 of type handle (defmethod inspect ((this handle)) (format #t "[~8x] ~A~%" this 'handle) (format #t "~Tprocess: #x~X~%" (-> this process)) (format #t "~Tpid: ~D~%" (-> this pid)) this ) ;; definition for method 2 of type handle (defmethod print ((this handle)) (if (nonzero? this) (format #t "#" (handle->process this) (-> this pid)) (format #t "#") ) this ) ;; definition of type state (deftype state (protect-frame) ((code function) (trans (function object)) (post function) (enter function) (event (function process int symbol event-message-block object)) ) (:methods (new (symbol type symbol function (function object) function (function object) (function process int symbol event-message-block object)) _type_) ) ) ;; definition for method 3 of type state (defmethod inspect ((this state)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) (format #t "~Tnext: ~A~%" (-> this next)) (format #t "~Texit: ~A~%" (-> this exit)) (format #t "~Tcode: ~A~%" (-> this code)) (format #t "~Ttrans: ~A~%" (-> this trans)) (format #t "~Tpost: ~A~%" (-> this post)) (format #t "~Tenter: ~A~%" (-> this enter)) (format #t "~Tevent: ~A~%" (-> this event)) this ) ;; definition of type event-message-block (deftype event-message-block (structure) ((to process) (from process) (num-params int32) (message symbol) (param uint64 7) ) :always-stack-singleton ) ;; definition for method 3 of type event-message-block (defmethod inspect ((this event-message-block)) (format #t "[~8x] ~A~%" this 'event-message-block) (format #t "~Tto: ~A~%" (-> this to)) (format #t "~Tfrom: ~A~%" (-> this from)) (format #t "~Tnum-params: ~D~%" (-> this num-params)) (format #t "~Tmessage: ~A~%" (-> this message)) (format #t "~Tparam[7] @ #x~X~%" (-> this param)) this ) ;; failed to figure out what this is: 0