httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: [PATCH] AcceptMutex and SingleListen runtime
Date Wed, 22 Aug 2001 14:46:32 GMT

> Below is the patch to implement AcceptMutex and SingleListen as
> runtime parameters. There is still a little lint to work through, but
> this is the implementation (eg: it would be nice to print/log the
> settings).
>
> Comments are welcome

> +
> +char *default_mutex_method(void)
> +{
> + char *t;
> +#if defined DEFAULT_SERIALIZED_ACCEPT_METHOD
> + t = "DEFAULT_SERIALIZED_ACCEPT_METHOD";

Doesn't this set t to the string "DEFAULT_SERIALIZED_ACCEPT_METHOD", rather than the value
of the DEFAULT_SERIALIZED_ACCEPT_METHOD #define?

> +#else
> + t = "default";
>  #endif
> +#if defined USE_USLOCK_SERIALIZED_ACCEPT
> + if ((!(strcasecmp(t,"default"))) || (!(strcasecmp(t,"uslock")))) {
> + return "uslock";
> + } else
> +#endif

So if DEFAULT_SERIALIZES_ACCEPT_METHOD is not defined, the default is uslock? Probably
should be fcntl.

> +#if defined USE_PTHREAD_SERIALIZED_ACCEPT
> + if ((!(strcasecmp(t,"default"))) || (!(strcasecmp(t,"pthread")))) {
> + return "pthread";
> + } else
> +#endif
> +#if defined USE_SYSVSEM_SERIALIZED_ACCEPT
> + if ((!(strcasecmp(t,"default"))) || (!(strcasecmp(t,"sysvsem")))) {
> + return "sysvmem";
> + } else
> +#endif
> +#if defined USE_FCNTL_SERIALIZED_ACCEPT
> + if ((!(strcasecmp(t,"default"))) || (!(strcasecmp(t,"fcntl")))) {
> + return "fcntl";
> + } else
> +#endif
> +#if defined USE_FLOCK_SERIALIZED_ACCEPT
> + if ((!(strcasecmp(t,"default"))) || (!(strcasecmp(t,"flock")))) {
> + return "flock";
> + } else
> +#endif
> +#if defined USE_OS2SEM_SERIALIZED_ACCEPT
> + if ((!(strcasecmp(t,"default"))) || (!(strcasecmp(t,"os2sem")))) {
> + return "os2sem";
> + } else
> +#endif
> +#if defined USE_TPF_CORE_SERIALIZED_ACCEPT
> + if ((!(strcasecmp(t,"default"))) || (!(strcasecmp(t,"tpfcore")))) {
> + return "tpfcore";
> + } else
> +#endif
> +#if defined USE_NONE_CORE_SERIALIZED_ACCEPT
> + if ((!(strcasecmp(t,"default"))) || (!(strcasecmp(t,"none")))) {
> + return "none";
> + } else
>  #endif
> + return "Request serialized accept method not available";
> +
> + return NULL;
> +}



Mime
View raw message