<br><div>Hi Gary,</div><div><br></div><div> Thanks for you answer. Yep your analysis is pretty close -- there was a macro which was trying to expand essentially to a </div><div> </div><div> (ccl::atomic-incf (ccl:make-semaphore)) </div>
<div><br></div><div>or </div><div><br></div><div> (ccl::atomic-decf (ccl:make-semaphore))</div><div><br></div><div><br></div><div>Clearly atomic-incf should not really have been used here in the first place because it's unexported and undocumented. </div>
<div><br></div><div>So the thing which is trying to be incremented and decremented is a semaphore. It appears that the correct way to deal with this is to use ccl:signal-semaphore and ccl:wait-on-semaphore instead of the direct atomic-incf and atomic-decf. I made that substitution, and portable aserve seems to be functioning correctly now, at least within our framework. </div>
<div><br></div><div>I will let you know when the change is committed into Sourceforge in case you care to review it. </div><div><br></div><div>By the way, the compile and fasl-load speed of CCL certainly is impressive!</div>
<div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 18, 2012 at 4:10 PM, Gary Byers <span dir="ltr"><<a href="mailto:gb@clozure.com" target="_blank">gb@clozure.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It'd be a little easier to say for certain if there was a backtrace or some<br>
other context, but the error looks like it's coming from an attempt to<br>
macroexpand something like:<br>
<br>
(ccl::atomic-incf (net.aserve::wserver-free-<u></u>workers ...) ...)<br>
<br>
(CCL::ATOMIC-INCF place &optional (delta 1)) ; there's also a CCL::ATOMIC-DECF<br>
<br>
knows how to atomically increment a few kinds of "places" (where the<br>
term "place" means something like "accessor", in much the same way<br>
that it does in discussing SETF and INCF and friends.) That handful<br>
includes (1) calls to CAR, CDR, and SVREF; (2) certain cases of THE,<br>
LOCALLY, LET/LET* wrapped around (1), and (3) macro calls that expand<br>
into (1) or (2). The error is saying that<br>
NET.ASERVE::WSERVER-FREE-<u></u>WORKERS is none of these things. It isn't<br>
(at least not at the time the ATOMIC-INCF is being expanded); I<br>
suppose that someone might think that it's 3 (a macro expected to<br>
expand into one of the other cases) and that this may be an EVAL-WHEN issue.<br>
<br>
It'd be nice if ATOMIC-INCF handled more cases (structure and slot accessors,<br>
more of CxxxR, other kinds of arrays/vectors ...), and it'd be nice if it<br>
was exported and documented. Someday it hopefully will be, but (among other<br>
issues) there'd be a LOT to document.<br>
<br>
If you need to atomically incrememt something and you can't be sure that<br>
CCL::ATOMIC-INCF will work (you can't even be sure that it'll be there), you<br>
can use a heavier hammer:<br>
<br>
<br>
(defvar *something-lock* (make-lock))<br>
<br>
(defstatic *something* 0) ; not thread-local<br>
<br>
(defun atomically-increment-something ()<br>
(with-lock-grabbed (*something-lock*)<br>
(incf *something*)))<br>
<br>
<br>
Of course, that's more expensive and you'd probably get tired of doing that<br>
if you had to do it more than a few times.<br>
<br>
Back to your question: if this code ever worked, it's likely that it did so<br>
because NET.ASERVE::WSERVER-FREE-<u></u>WORKERS was a macro that expanded into<br>
something that CCL::ATOMIC-INCF could deal with; if it's not a macro at<br>
the time it's being used (but will be later), that's obviously "some sort<br>
of build problem".<div class="im"><br>
<br>
On Tue, 18 Dec 2012, Dave Cooper wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
Dear All,<br>
I am trying to get the latest Quicklisp Portable Aserve:<br></div>
??<br>
? ?portableaserve-20121125-cvs/<br>
<br>
?working with the latest CCL from Apple Mac Store:<br>
<br>
? ?ccl-1.8-f95-macosx-x64?<div class="im"><br>
<br>
Although it looks as though Portable Allegroserve has recently been updated<br>
for CCL (in October of 2012), I am still getting an error when doing<br>
ql:quickload on it:<br>
<br></div>
?value NET.ASERVE::WSERVER-FREE-<u></u>WORKERS is not of the expected type (MEMBER<div class="im"><br>
THE LET LET* LOCALLY CAR CDR SVREF). [Condition of type TYPE-ERROR]<br>
<br>
It looks like this probably worked in the past, since there are specific<br>
directives for :openmcl-native-threads around the initform of free-workers<br></div>
in <a href="http://main.cl" target="_blank">main.cl</a>.?<div class="im"><br>
<br>
Has anyone a clue of what the issue is here, or would care to have a look at<br></div>
it? ?<div class="im"><br>
<br>
We are working to get our Genworks-GDL system<br>
(<a href="http://github.com/genworks/Genworks-GDL" target="_blank">http://github.com/genworks/<u></u>Genworks-GDL</a>) working on CCL, and I got the main<br>
kernel and basic geometry packages to build today. The next hurdle appears<br>
to be Portable Allegroserve (yes, we are somewhat entrenched in paserve as<br>
our webserver, moving to another CL webserver in the short term would not be<br>
trivial...)<br>
<br>
<br>
--<br>
<br>
My Best,<br>
<br>
Dave Cooper, Genworks Support<br>
<a href="mailto:david.cooper@genworks.com" target="_blank">david.cooper@genworks.com</a>, <a href="http://dave.genworks.com" target="_blank">dave.genworks.com</a>(skype)<br>
USA: <a href="tel:248-327-3253" value="+12483273253" target="_blank">248-327-3253</a>(o), <a href="tel:1-248-330-2979" value="+12483302979" target="_blank">1-248-330-2979</a>(mobile)<br>
UK: 0191 645 1699<br>
<br>
<br>
</div></blockquote>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br>My Best,<br><br>Dave Cooper, Genworks Support<br><a href="mailto:david.cooper@genworks.com" target="_blank">david.cooper@genworks.com</a>, <a href="http://dave.genworks.com" target="_blank">dave.genworks.com</a>(skype)<br>
USA: 248-327-3253(o), 1-248-330-2979(mobile)<br>UK: 0191 645 1699<br>
</div>