[m-dev.] For review: coroutining changes

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Dec 11 15:02:52 AEDT 1998


On 11-Dec-1998, Thomas Charles Conway <conway at hydra.cs.mu.oz.au> wrote:
> Fergus,
> 
> I thought I'd posted a reply to your review with the requested changes,
> but if I did it seems to have landed in the bit bucket. Here it is again.

> +++ mercury_conf.h.in	1998/11/30 04:03:26
> @@ -90,6 +90,7 @@
>  **	HAVE_GETPAGESIZE 	we have the getpagesize() system call.
>  **	HAVE_MPROTECT    	we have the mprotect() system call.
>  **	HAVE_MEMALIGN    	we have the memalign() function.
> +**	HAVE_SELECT 	   	we have the select() function.
>  **	HAVE_STRERROR    	we have the strerror() function.
>  **	HAVE_SETITIMER   	we have the setitimer() function.
>  **	HAVE_MEMMOVE   		we have the memmove() function.

As I said in my comments last time,
this documentation for HAVE_SELECT is misleading.
See my comment from last time for further details.

> +++ mercury_context.c	1998/11/30 04:20:29
> +#include "mercury_reg_workarounds.h"	/* for `MR_fd* stuff' */

The closing single quote is in the wrong place.

> +void schedule(MR_Context *ctxt);
> +
> +/*
>  #define schedule(cptr)						\

Why is this definition commented out?
You should document the reason.

> +++ mercury_misc.c	1998/11/30 03:57:26
> @@ -523,3 +523,4 @@
>  {
>  	HASH_STRING_FUNC_BODY
>  }
> +

This change should not be part of this diff.

Please review your own diffs before posting them ;)

> --- mercury_misc.h	1998/11/09 10:24:38	1.11
> +++ mercury_misc.h	1998/11/30 03:57:37
...
> +#include <sys/types.h>		/* for fd_set */

This should be #ifdefd.
<sys/types.h> is not ANSI.

> --- mercury_reg_workarounds.h ---
...
> /*
> ** mercury_misc.h -	MR_fd_zero
> */

The comment is wrong.

> #if HAVE_SELECT

That should be #ifdef rather than #if.
(Actually `#if' works, but it may result in compiler warnings.)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list