public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Alex Brown" <agb@cea.com.au>
To: <ecos-discuss@sourceware.cygnus.com>
Subject: [ECOS] Bug in timed message box get function ?
Date: Mon, 19 Feb 2001 16:49:00 -0000	[thread overview]
Message-ID: <000901c09ad7$2900fa70$340210ac@FRY> (raw)

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

             reply	other threads:[~2001-02-19 16:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-19 16:49 Alex Brown [this message]
2001-02-20  9:31 ` Hugo Tyson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000901c09ad7$2900fa70$340210ac@FRY' \
    --to=agb@cea.com.au \
    --cc=ecos-discuss@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).