Modify

Opened 16 years ago

Closed 12 years ago

#78 closed Bugs (Fixed)

pthread_delay_np() parm incorrect

Reported by: cpqlvc Owned by: glassfordm
Milestone: Component: threads
Version: None Severity:
Keywords: Cc:

Description

aix.hpp #define's BOOST_HAS_PTHREAD_DELAY_NP, and in 
fact there is a prototype for pthread_delay_np() 
in /usr/include/pthread.h.  This function is invoked 
by thread.cpp thread::sleep(), after it calls 
to_timespec() to convert "xtime" to "timespec".  
to_timespec() essentially copies the two corresponding 
fields, so the parameter that's passed to 
pthread_delay_np() is relative to the Unix epoch.  On 
my RS/6000 AIX 4.3 box this results in an endless 
sleep.

According to the man page for pthread_delay_np()

"The pthread_delay_np subroutine causes the calling 
thread to delay execution for a specified period of 
elapsed wall clock time. The period of time the thread 
waits is at least as long as the number of seconds and 
nanoseconds specified in the interval parameter."

I interpret this to mean that the parameters values is 
relative to the time that pthread_delay_np() is 
invoked.  I tested my hypothesis by changing 
thread::sleep() to invoke to_timespec_duration(), and 
this seems to work.

Thanks,

Doug

Attachments (0)

Change History (1)

comment:1 Changed 12 years ago by Markus Schöpflin

Status: assignedclosed
Logged In: YES 
user_id=91733

This has been fixed on the RC_1_28_0 branch and has also
been merged to HEAD in 05/2002.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain glassfordm.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.