[m-dev.] for review: changes to runtime required for webserver
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Aug 22 01:05:07 AEST 2000
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.
> +++ 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.
--
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.
--------------------------------------------------------------------------
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