All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 3/4] tst_timer: Create interface for using multiple timers
Date: Thu, 16 Aug 2018 14:59:53 +0200	[thread overview]
Message-ID: <20180816125953.GA30369@rei> (raw)
In-Reply-To: <87bma24gek.fsf@rpws.prws.suse.cz>

Hi!
> Well if the clock is not supported and the call fails, then the user
> will have to deal with that at the call site of tst_timer_start which is
> not very convenient for tst_fuzzy_sync. I would rather have a seperate
> initialisation function for the tst_timer struct which can be called in
> the setup function. e.g. tst_timer_init[_st](clock_id, timeout, ...).
> 
> >
> > And lastly but not least, we were also discussion special timer id,
> > something as TST_TIMER_DEFAULT that would select appropriate timer,
> > althoug I guess that CLOCK_MONOTONIC is supporoted on anything that we
> > care for these days.
> 
> Yeah, fuzzy_sync just defines CLOCK_MONOTIC to CLOCK_MONOTONIC_RAW if
> possible and uses that. Not had any reports of CLOCK_MONOTONIC being
> unavailabe.

Maybe we can just do:

#ifdef CLOCK_MONOTONIC_RAW
# define TST_CLOCK_DEFAULT CLOCK_MONOTONIC_RAW
#else
# define TST_CLOCK_DEFAULT CLOCK_MONOTONIC
#endif

And be done with it.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2018-08-16 12:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-16 12:00 [LTP] [PATCH v3 1/4] lib: Allow user to easily get LTP_TIMEOUT_MUL value Richard Palethorpe
2018-08-16 12:00 ` [LTP] [PATCH v3 2/4] tst_timer: Convert to new library Richard Palethorpe
2018-08-16 12:08   ` Cyril Hrubis
2018-08-16 12:00 ` [LTP] [PATCH v3 3/4] tst_timer: Create interface for using multiple timers Richard Palethorpe
2018-08-16 12:22   ` Cyril Hrubis
2018-08-16 12:27     ` Cyril Hrubis
2018-08-16 13:06       ` Richard Palethorpe
2018-08-16 12:58     ` Richard Palethorpe
2018-08-16 12:59       ` Cyril Hrubis [this message]
2018-08-16 12:00 ` [LTP] [PATCH v3 4/4] fzsync: Limit execution time to prevent test timeouts Richard Palethorpe
2018-08-17  7:43   ` Li Wang
2018-08-17  9:04     ` Li Wang

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=20180816125953.GA30369@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.