[ace-users] ACE_Semaphore::acquire (tv) error

Steve Huston shuston at riverace.com
Sat Jul 28 11:02:05 CDT 2007


I made some changes to this area for ACE 5.5.10 - please get it and
retry.

--
Steve Huston, Riverace Corporation
Would you like ACE to run great on your platform?
See http://www.riverace.com/sponsor.htm


> -----Original Message-----
> From: ace-users-bounces at cse.wustl.edu=20
> [mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of Johnny
Willemsen
> Sent: Saturday, July 28, 2007 9:37 AM
> To: 'cui shaowei'; ace-users at cs.wustl.edu
> Subject: Re: [ace-users] ACE_Semaphore::acquire (tv) error
>=20
>=20
> Hi,
>=20
> Probably you have used the autoconf way of compiling, please use the
> traditional way.
>=20
> Regards,
>=20
> Johnny Willemsen
> Remedy IT
> Postbus 101
> 2650 AC  Berkel en Rodenrijs
> The Netherlands
> www.theaceorb.nl / www.remedy.nl =20
>=20
> *** Integrated compile and test statistics see
> http://scoreboard.theaceorb.nl ***
> *** Commercial service and support for ACE/TAO/CIAO             ***
> *** See http://www.theaceorb.nl/en/support.html                 ***=20
>=20
> > HI :
> > PRF:
> > ACE VERSION: 5.5.9
> >=20
> >   HOST MACHINE and OPERATING SYSTEM:
> >        Red Hat Enterprise Linux AS release 4 (Nahant Update 3)
run
> > on wmware workstation 6.0
> >=20
> >   COMPILER NAME AND VERSION (AND PATCHLEVEL):
> >   gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
> >=20
> >   Question:
> > I wirte simple test:
> >   #include <ace/Semaphore.h>
> >   #include <ace/Time_Value.h>
> >   #include <ace/OS.h>
> >   #include <iostream>
> >=20
> >  int main (int argc, char *argv[])
> >  {
> >    ACE_Semaphore sem (0);
> >    ACE_Time_Value tv =3D ACE_OS::gettimeofday ();
> >    tv.sec (tv.sec () + 5);
> >    if (sem.acquire (tv) =3D=3D -1)                 // but it=20
> does't block
> > , if use sem.acquire () it's block
> >       perror ("");                             // it print=20
> "Operation
> > not supported"
> >    std::cout << "over" << std::endl;
> >    return 0;
> >  }
> >  why use timeout acquire doesn't block? and why "Operation=20
> > not supported"
> >=20
> > --=20
> > |  (\_/)  This is Bunny. Copy and paste Bunny
> > | (=3D'.'=3D) into your signature to help him gain
> > | (")_(") world domination.
> >=20
> > =B4=DE=C9=D9=CE=B0
> > Tel:    13810421852
> > QQ:    43458943
> > MSN: shaovie at hotmail.com
> >=20
>=20
>=20




More information about the Ace-users mailing list