[LLVMdev] Files to lib/System/Win32

Jeff Cohen jeffc at jolt-lang.org
Wed Sep 15 22:13:16 PDT 2004


I've only seen the article online.  I cannot find anything that
explicitly grants permission, though my understanding is the same as
yours.  So to be on the safe side, I'll rewrite it.  I pretty much have
to do that anyway to make it conform to LLVM coding standards :)

And I now realize my code has concurrency issues.  What, you ask?  How
can a non-threaded program like LLVM have concurrency issues?  Well, on
Windows any application can find itself growing extra threads.  The
culprit in this case is the console handler.  If you hit CTRL/C, a new
thread magically appears to execute the handler.  So the globals that
hold the list of files and directories to be deleted might be modified
in one thread as the other iterates them.  Very unlikely to occur, but
theoretically possible.  Have to introduce a critical section.

Oh dear.. will an exception be thrown if the file cannot be deleted
because it's currently open?  Have to handle that too if so...


On Thu, 16 Sep 2004 00:10:38 -0500 (CDT)
Chris Lattner <sabre at nondot.org> wrote:

> On Wed, 15 Sep 2004, Jeff Cohen wrote:
> 
> > No, there isn't.  It was originally published in Microsoft Systems
> > Journal.  There's no license I can find in any of the files that
> > accompany the article.  If publication in MSJ or MSDN doesn't make it
> > fair game, then I guess I'll have to rewrite it.
> 
> I suspect that it's not actually a problem: MS *wants* developers to copy
> the code into their proprietary apps to make them better.  However, some
> reassurance of this is necessary: is there something in the front of the
> magazine that specifies usage rights for the code or something like that?
> 
> -Chris




More information about the llvm-dev mailing list