From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alex Brown" To: Subject: [ECOS] Bug in timed message box get function ? Date: Mon, 19 Feb 2001 16:49:00 -0000 Message-id: <000901c09ad7$2900fa70$340210ac@FRY> X-SW-Source: 2001-02/msg00318.html I think I have found a bug in the timed mbox get function. The symptom is that it only accurately times out the first time it is called. Further calls will always return immediately. The problem (from what I can see), is that the alarm routines used in mboxt2.inl take absolute times yet they are always passed in a delay. I made a small change to mbox.cxx that solved the problem for me: New: Cyg_Mbox::get( cyg_tick_count timeout ) { void * p; if ( ! m.get( p, Cyg_Clock::real_time_clock->current_value()+timeout ) ) return NULL; return p; } Old: Cyg_Mbox::get( cyg_tick_count timeout ) { void * p; if ( ! m.get( p, timeout ) ) return NULL; return p; } Is this a bug ? or am I doing something wrong ? Regards, Alex Brown agb@cea.com.au