You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Vinod Mehra <vi...@beasys.com> on 1999/11/12 22:35:58 UTC

mutex redefinition problem on Solaris

I wanted to use Apache's cross platform API for data mutex locking. For that
I tried to include "multithread.h".  As soon as I do that on Solaris I am
getting a 
compilation error for redefinition of "mutex", I guess it is defined in
another header file 
too. eg : /usr/include/sys/mutex.h

Can somebody advice a way out?

Thanks,
Vinod.

Re: mutex redefinition problem on Solaris

Posted by Greg Stein <gs...@lyra.org>.
He just told you: don't use these functions! They DO NOT WORK (as you
expect) on Unix platforms. They exist for the Win32 platform ONLY.

-g


On Fri, 12 Nov 1999, Vinod Mehra wrote:

> Yes I am trying to use the same set of functions. 
> 
> My problem is... 
> 
> - mutex is defined in multithread.h (apache header file)
> - It is also defined in /usr/include/sys/mutex.h
> 
> So I get "redefinition" compilation error.
> 
> I don't know how to resolve this issue.
> 
> Vinod.
> 
> At 04:47 PM 11/12/99 -0600, you wrote:
> >On Fri, Nov 12, 1999 at 01:35:58PM -0800, Vinod Mehra wrote:
> >> I wanted to use Apache's cross platform API for data mutex locking.
> >
> >This code is not intended for use by third-party modules. And if you
> >think it will work on Unix to lock data between threads, take a look
> >at it:
> >
> >#define ap_create_mutex(name)   ((mutex *)ap_dummy_mutex)
> >#define ap_acquire_mutex(mutex_id)      ((int)MULTI_OK)
> >#define ap_release_mutex(mutex_id)      ((int)MULTI_OK)
> >#define ap_destroy_mutex(mutex_id)      (0)
> >
> >This should tell you otherwise.
> >
> >-- 
> >Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
> > 
> 

--
Greg Stein, http://www.lyra.org/


Re: mutex redefinition problem on Solaris

Posted by Vinod Mehra <vi...@beasys.com>.
Yes I am trying to use the same set of functions. 

My problem is... 

- mutex is defined in multithread.h (apache header file)
- It is also defined in /usr/include/sys/mutex.h

So I get "redefinition" compilation error.

I don't know how to resolve this issue.

Vinod.

At 04:47 PM 11/12/99 -0600, you wrote:
>On Fri, Nov 12, 1999 at 01:35:58PM -0800, Vinod Mehra wrote:
>> I wanted to use Apache's cross platform API for data mutex locking.
>
>This code is not intended for use by third-party modules. And if you
>think it will work on Unix to lock data between threads, take a look
>at it:
>
>#define ap_create_mutex(name)   ((mutex *)ap_dummy_mutex)
>#define ap_acquire_mutex(mutex_id)      ((int)MULTI_OK)
>#define ap_release_mutex(mutex_id)      ((int)MULTI_OK)
>#define ap_destroy_mutex(mutex_id)      (0)
>
>This should tell you otherwise.
>
>-- 
>Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
> 

Re: mutex redefinition problem on Solaris

Posted by Manoj Kasichainula <ma...@io.com>.
On Fri, Nov 12, 1999 at 01:35:58PM -0800, Vinod Mehra wrote:
> I wanted to use Apache's cross platform API for data mutex locking.

This code is not intended for use by third-party modules. And if you
think it will work on Unix to lock data between threads, take a look
at it:

#define ap_create_mutex(name)   ((mutex *)ap_dummy_mutex)
#define ap_acquire_mutex(mutex_id)      ((int)MULTI_OK)
#define ap_release_mutex(mutex_id)      ((int)MULTI_OK)
#define ap_destroy_mutex(mutex_id)      (0)

This should tell you otherwise.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/