[m-dev.] tech preview 1: webserver

Peter Ross peter.ross at miscrit.be
Mon Aug 21 19:09:30 AEST 2000


I am pleased to announce my tech preview 1 (working with NT does this to
you) for a mercury webserver.

This new state of the art web server includes such things as:
    * all io done using type-classes
    * spawning a new thread to handle each connection
    * an implementation of haskell style mutvars
    * a sockets library
    * implemented in the hlc.par.gc grade
    * works under linux using pthreads, however maybe later today it
      will also work under windows.

Download now at http://www.miscrit.be/staff/petdr/webserver.tgz

but don't forget to apply the attached patch!

Pete
-------------- next part --------------
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.57
diff -u -r1.57 ml_code_gen.m
--- compiler/ml_code_gen.m	2000/08/09 07:47:13	1.57
+++ compiler/ml_code_gen.m	2000/08/21 08:42:59
@@ -2097,7 +2097,7 @@
 				Cast = ""
 			)
 		},
-		{ string__format("\t%s = %s\n",
+		{ string__format("\t%s = %s ",
 			[s(ArgName), s(Cast)],
 			AssignToArgName) },
 		{ AssignInput = [
@@ -2179,7 +2179,7 @@
 		},
 		{ string__format(" = %s%s;\n", [s(RHS_Cast), s(ArgName)],
 			AssignFromArgName) },
-		{ string__format("\t%s\n", [s(LHS_Cast)], AssignTo) },
+		{ string__format("\t%s ", [s(LHS_Cast)], AssignTo) },
 		{ AssignOutput = [
 			raw_target_code(AssignTo),
 			target_code_output(ArgLval),
Index: runtime/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/Mmakefile,v
retrieving revision 1.62
diff -u -r1.62 Mmakefile
--- runtime/Mmakefile	2000/08/17 05:31:09	1.62
+++ runtime/Mmakefile	2000/08/21 08:43:12
@@ -69,6 +69,7 @@
 			mercury_reg_workarounds.h	\
 			mercury_regorder.h	\
 			mercury_regs.h		\
+			mercury_semaphore.h	\
 			mercury_signal.h	\
 			mercury_std.h		\
 			mercury_stack_layout.h	\
@@ -139,6 +140,7 @@
 			mercury_prof_mem.c	\
 			mercury_reg_workarounds.c	\
 			mercury_regs.c		\
+			mercury_semaphore.c	\
 			mercury_signal.c	\
 			mercury_stack_trace.c	\
 			mercury_stacks.c	\
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.68
diff -u -r1.68 mercury_wrapper.c
--- runtime/mercury_wrapper.c	2000/08/15 08:07:32	1.68
+++ runtime/mercury_wrapper.c	2000/08/21 08:43:17
@@ -1329,9 +1329,12 @@
 
 	if (MR_profiling) MR_prof_finish();
 
-#ifdef	MR_THREAD_SAFE
+#ifndef MR_HIGHLEVEL_CODE
+  #ifdef MR_THREAD_SAFE
+	/* XXX look into this */
 	MR_exit_now = TRUE;
 	pthread_cond_broadcast(MR_runqueue_cond);
+  #endif
 #endif
 
 	terminate_engine();



More information about the developers mailing list