[ace-users] ace-users Digest, Vol 12, Issue 43
Michael Carr
mcarr92365 at yahoo.com
Tue Jul 31 16:33:48 CDT 2007
ACE version: 5.5.1
Host: Intel PC, Fedora Core 5 Linux
Target: same
Thanks for the fast response (as usual) Doug. I
checked to see if I had ACE_HAS_PTHREADS_UNIX98_EXT
defined, and it is, so I tried running
Upgradable_RW_Test, and it seemed to fail. I did
uncomment out // #define RW_MUTEX which seemed
correct.
So, I caame up with my own trivial test:
#include "ace/RW_Thread_Mutex.h"
int ACE_TMAIN (int, ACE_TCHAR **)
{
#ifdef ACE_HAS_PTHREADS_UNIX98_EXT
printf("ACE_HAS_PTHREADS_UNIX98_EXT defined.\n");
#else
printf("ACE_HAS_PTHREADS_UNIX98_EXT not
defined!\n");
#endif
ACE_RW_Thread_Mutex rw_mutex;
rw_mutex.acquire_read();
printf("acquired for read\n");
int result = rw_mutex.tryacquire_write_upgrade();
printf("tried upgrade, result = %d\n", result);
perror(0);
return 0;
}
The output of the test is as follows:
[mcarr at alien scratch]$ ./semTest
ACE_HAS_PTHREADS_UNIX98_EXT defined.
acquired for read
tried upgrade, result = -1
Device or resource busy
Anyone know what I am doing wrong?
Thanks in advance,
Michael Carr
--- ace-users-request at cse.wustl.edu wrote:
> Message: 4
> Date: Tue, 31 Jul 2007 12:24:26 -0500
> From: "Douglas C. Schmidt"
> <schmidt at dre.vanderbilt.edu>
> Subject: Re: [ace-users] Is
> ACE_Lock::tryacquire_write_upgrade()
> supported on Linux?
> To: Michael Carr <mcarr92365 at yahoo.com>
> Cc: ace-users at cs.wustl.edu
> Message-ID:
>
<20070731172427.52DA41000A8 at tango.dre.vanderbilt.edu>
>
>
> Hi Michael,
>
> Thanks for using the PRF.
>
> > ACE VERSION: 5.5.1
>
> Please upgrade to ACE+TAO+CIAO x.5.9 (i.e., ACE
> 5.5.9, TAO 1.5.9, and
> CIAO 0.5.9), which you can download from
>
> http://download.dre.vanderbilt.edu
>
> under the heading: "Latest Beta Kit".
>
> The DOC groups at Washington University, UC Irvine,
> and Vanderbilt
> University only provide "best effort" support for
> non-sponsors for the
> latest release, as described in
>
>
http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html
>
> Thus, if you need more "predictable" help for
> earlier versions of
> ACE+TAO, I recommend that you check out
>
> http://www.dre.vanderbilt.edu/support.html
>
> for a list of companies that will provide you with
> ACE+TAO commercial
> support.
>
> > HOST MACHINE and OPERATING SYSTEM:
> > Intel PC, Fedora Core 5 Linux
> >
> > TARGET MACHINE and OPERATING SYSTEM:
> > Same
> >
> > COMPILER NAME AND VERSION (AND PATCHLEVEL):
> > gcc v. 3.4.6
> >
> > Someone at my organization said that this method
> is
> > not supported on Solaris, and asked me to double
> check
> > that it is supported on Linux.
>
> This method is available natively if your OS
> platform supports
>
> ACE_HAS_PTHREADS_UNIX98_EXT
>
> It's also available if you use the ACE rwlock
> emulation, which is set if
> you enable ACE_LACKS_RWLOCK_T. This works on all OS
> platforms,
> including Solaris.
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/
More information about the Ace-users
mailing list