[erlisp-devel] process-linking errors

Eric Lavigne lavigne.eric at gmail.com
Thu Sep 1 05:16:12 UTC 2005


I've written most of the code for process-linking, but I'm having some
trouble with the function check-system-messages. When I compile it, I
get lots of errors that I don't understand. When I run it, it
continues indefinitely and slows my computer to a crawl.

A little explanation about the 'checking-system-messages in process: 
If a user program tries to do a receive, Erlisp should check for
system messages first so the user program doesn't see them. There's a
problem with receive calling check-system-messages and also having
check-system-messages calling receive because it tends to create
infinite loops. My solution was to explicitely check for this
circularity, so receive will only call check-system-messages if it was
not called by check-system-messages.

I have attached copies of the error messages and the modified source
files (process.lisp and messaging.lisp). Hopefully someone has an idea
what is going on. I will give this another try in the morning. Just
one more day left for SoC, so I'm giving it one final push.

Eric
 
==================
in process.lisp
==================
(defun check-system-messages ()
  (setf (slot-value (current-process) 'checking-system-messages) t)
  (do ((msg (receive-with-matcher (cond-matcher m)
				  ((and (consp m) (eq (first m) 'system))
				   (rest m))
				  ((:timeout 0) nil))
	    (receive-with-matcher (cond-matcher m)
				  ((and (consp m) (eq (first m) 'system))
				   (rest m))
				  ((:timeout 0) nil))))
      ((not msg) 'done)
    (when (consp msg)
      (cond ((and (eq (first msg) 'link-kill) (not (slot-value
(current-process) 'dying)))
	     (error "Linked process died. My turn."))
	    ((and (eq (first msg) 'link-request))
	     (reverse-link (second msg) :link-type (third msg))))))
  (setf (slot-value (current-process) 'checking-system-messages) nil))
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: error_8-31.txt
URL: <https://mailman.common-lisp.net/pipermail/erlisp-devel/attachments/20050901/4347c405/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: messaging.lisp
Type: application/octet-stream
Size: 5457 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/erlisp-devel/attachments/20050901/4347c405/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: process.lisp
Type: application/octet-stream
Size: 6184 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/erlisp-devel/attachments/20050901/4347c405/attachment-0001.obj>


More information about the Erlisp-devel mailing list