public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ulatekh at yahoo dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug librt/28799] New: [Feature request] Enhanced timer_create()/timer_delete(), for MS Windows parity
Date: Thu, 20 Jan 2022 15:32:04 +0000	[thread overview]
Message-ID: <bug-28799-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28799

            Bug ID: 28799
           Summary: [Feature request] Enhanced
                    timer_create()/timer_delete(), for MS Windows parity
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: librt
          Assignee: unassigned at sourceware dot org
          Reporter: ulatekh at yahoo dot com
  Target Milestone: ---

I’m in the middle of porting a very large legacy code base from MS Windows to
Linux.
One outpoint I've run into is in timer_delete(); there's no way to determine
when no more callbacks are forthcoming.
This makes it impossible to clean up safely after deleting a timer, especially
if the value passed in struct sigevent's sigev_value.sival_ptr is dynamically
allocated, e.g. a C++ object.
The MS Windows API call DeleteTimerQueueTimer(), and even the ancient
timeSetEvent(), allow for notification that there will be no forthcoming timer
callbacks.
It pains me to see Linux not having an answer to anything MS Windows can do,
and the fix is easy (though it'll require an updated API, like
timer_create2()/timer_delete2() or something, if one chooses to follow ffmpeg's
convention when APIs are updated.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-01-20 15:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 15:32 ulatekh at yahoo dot com [this message]
2022-01-20 16:51 ` [Bug librt/28799] " fweimer at redhat dot com
2022-01-21  8:37 ` fweimer at redhat dot com
2022-01-21 17:14 ` ulatekh at yahoo dot com
2022-03-01 13:16 ` fweimer at redhat dot com

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=bug-28799-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).