All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias DiPasquale <codeslinger@gmail.com>
To: linux-net <linux-net@vger.kernel.org>,
	netfilter <netfilter@lists.netfilter.org>,
	nf-devel <netfilter-devel@lists.netfilter.org>,
	netfilter-failover@lists.netfilter.org
Subject: del_timer[_sync]
Date: Wed, 22 Sep 2004 07:41:02 -0400	[thread overview]
Message-ID: <876ef97a04092204415fb5f672@mail.gmail.com> (raw)

Hi all,

I have a timer that fires every $X seconds while the module is loaded.
I want to stop and remove the timer upon module unload. What is the
proper way to accomplish this?

In the module's __exit function, I am using this code to remove the timer:

[...]
del_timer_sync( &timer);
if (timer_pending( &timer))
       del_timer( &timer);
[...]

Is this the right way, or unnecessary overkill? I've seen multiple
ideas on how best to properly remove a timer. Thanks in advance! :)

-- 
[ Tobias DiPasquale ]
0x636f6465736c696e67657240676d61696c2e636f6d


                 reply	other threads:[~2004-09-22 11:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=876ef97a04092204415fb5f672@mail.gmail.com \
    --to=codeslinger@gmail.com \
    --cc=linux-net@vger.kernel.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=netfilter-failover@lists.netfilter.org \
    --cc=netfilter@lists.netfilter.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 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.