[ace-users] ace-users Digest, Vol 12, Issue 43
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Wed Aug 1 02:39:18 CDT 2007
Hi Michael,
Thanks for providing the version info.
>ACE version: 5.5.1
Please upgrade to ACE+TAO+CIAO x.5.10 (i.e., ACE 5.5.10, TAO 1.5.10, and
CIAO 0.5.10), 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: 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.
In which way did it 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?
I recommend you step through this program in your debugger to figure
out where the call is failing. Please also check the man page for
pthread_rwlock_wrlock() to make sure you understand the semantics. See
http://www.opengroup.org/onlinepubs/000095399/functions/pthread_rwlock_wrlock.html
for the manual page. Finally, you might try disabling
ACE_HAS_PTHREADS_UNIX98_EXT and recompiling with emulated RW locks
enabled to see if there's a bug with pthreads on Linux.
Thanks,
Doug
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.schmidt at vanderbilt.edu
More information about the Ace-users
mailing list