[m-dev.] for review: changes to runtime required for webserver

Peter Ross peter.ross at miscrit.be
Tue Aug 22 01:39:06 AEST 2000


On Tue, Aug 22, 2000 at 01:05:07AM +1000, Fergus Henderson wrote:
> On 21-Aug-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> > Changes required to the Mercury runtime so as to build the webserver
> > written by Peter Ross.
> > 
> > runtime/Mmakefile:
> >     Add the new semaphore files.
> >     
> > runtime/mercury_semaphore.h:
> > runtime/mercury_semaphore.c:
> >     Add an implementation of semaphores written by Tom Wagner for
> >     pthreads.  The only changes made to the code was so that it obeys
> >     the Mercury C coding convention.
> 
> Why should those files be added to the Mercury runtime,
> rather than just being a library that gets linked into the web server?
> 
> Adding anything to the runtime increases the size of the libmer.so
> file that gets linked into every executable, so we should try to avoid
> adding code to the runtime.
> 
Good point.  They are needed so that I can implement haskell style
Mvars.  They do not explicitly need to be in the runtime.

> > +++ mercury_semaphore.c	Tue Aug 22 00:11:18 2000
> ...
> > +int         checked_pthread_cond_signal(pthread_cond_t *c);
> > +int         checked_pthread_cond_wait(pthread_cond_t *c, pthread_mutex_t *m);
> > +int         checked_pthread_mutex_unlock(pthread_mutex_t *m);
> > +int         checked_pthread_mutex_lock(pthread_mutex_t *m);
> 
> s/int/static int/g
> (and likewise in the function definitions)
> 
> > runtime/mercury_wrapper.c:
> >     When compiling in the hlc.par.gc grade the runqueue doesn't exist
> >     so don't do any processing on it.
> 
> That change to mercury_wrapper.c is fine.
> Go ahead and commit that part of this change.
> 
Will do.

Pete
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list