public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Eric Piel <Eric.Piel@Bull.Net>
Cc: george anzinger <george@mvista.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: DELAYTIMER_MAX is defined
Date: Wed, 07 May 2003 00:48:55 -0700	[thread overview]
Message-ID: <3EB8BA67.4060708@redhat.com> (raw)
In-Reply-To: <3EB8B5EA.BD5D1C19@Bull.Net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Piel wrote:

>>>Playing around with the posix timers I've noticed that DELAYTIMER_MAX is
>>>not defined. This constant is specified in the POSIX specifications. It
>>>should contain the maximum possible value of overruns on a signal. It is
>>>also said that the overrun shouldn't overflow. cf
>>>http://www.opengroup.org/onlinepubs/007904975/functions/timer_getoverrun.html

This is not correct.  The constant does not have to be defined.  Like
all the various *_MAX constants they only have to be defined if there is
a fixed limit the implementation has.  If there is none or it can only
be defined dynamically at runtime the the macro must not be defined.
Instead sysconf() can provide the value.  But not even this is
necessary.  sysconf() can return -1.

Anyway, in this specific case the implementation should be protected
against the ever so improbable overflow of the counter, yes.  If you
want a fixed value, fine.  If you want to use ULONG_MAX (or whatever),
good too.  Whether we advertise this limit is another thing.
Advertising it in the macro means it never can be changed.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+uLpr2ijCOnn/RHQRAgiAAKCIj4hn7m/lkOIrLjHjqirTFPfvhQCeLbxB
cl9pJ+BTHy7VQzpCDeyjmSs=
=WTUD
-----END PGP SIGNATURE-----


  reply	other threads:[~2003-05-07  7:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-06 16:33 [PATCH]: DELAYTIMER_MAX is defined Eric Piel
2003-05-06 20:12 ` george anzinger
2003-05-07  7:29   ` Eric Piel
2003-05-07  7:48     ` Ulrich Drepper [this message]
2003-05-07 12:00       ` Eric Piel
2003-05-07 15:02         ` george anzinger
2003-05-07 18:21           ` Ulrich Drepper
2003-05-07 18:47             ` george anzinger
2003-05-07 19:03               ` Ulrich Drepper

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=3EB8BA67.4060708@redhat.com \
    --to=drepper@redhat.com \
    --cc=Eric.Piel@Bull.Net \
    --cc=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    /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