[m-rev.] diff: Fix a problem with semaphores in the IL backend

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jun 13 18:00:58 AEST 2007


On Wed, 13 Jun 2007, Jonathan Morgan wrote:

> Note that, as with the previous change to threading, this change only
> ensures that the module compiles.  I haven't tested whether the module
> does the right thing under the IL backend.
>
> Jon
>
> =============================================================
> Estimated hours taken: 0.5
> Branches: main
>
> Fixed a problem with the semaphore module that prevented the library from
> linking under the IL backend.
>
> library/thread.semaphore.m:
> 	Altered the IL foreign type definition for a semaphore to refer to 
> the
> 	`mercury' assembly rather than `semaphore__csharp_code' (which is
> 	not correct for the standard library).  This compiled, but caused
> 	linker errors due to the undefined assembly that was referenced.
>
> Index: library/thread.semaphore.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/library/thread.semaphore.m,v
> retrieving revision 1.7
> diff -u -r1.7 thread.semaphore.m
> --- library/thread.semaphore.m	30 May 2007 08:16:09 -0000	1.7
> +++ library/thread.semaphore.m	13 Jun 2007 06:25:42 -0000
> @@ -80,15 +80,15 @@
>    } ML_Semaphore;
> ").
>
> -:- pragma foreign_decl("C#", "
> +:- pragma foreign_code("C#", "
> public class ML_Semaphore {
>    public int count;
> -}
> +};
> ").

Is there a distinction between foreign_decl and foreign_code pragmas
for C#?

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list