From: valdis.kletnieks@vt.edu (valdis.kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: boot time variable
Date: Tue, 10 Oct 2017 03:50:09 -0400 [thread overview]
Message-ID: <39732.1507621809@turing-police.cc.vt.edu> (raw)
In-Reply-To: <20171009231709.GB20083@eros>
On Tue, 10 Oct 2017 10:17:09 +1100, "Tobin C. Harding" said:
> I would like to create a boot time variable i.e a variable that is set once at boot time. Variable
> does not need to be globally accessible. (actually I am using two variables).
The canonical way to have stuff happen at boot is usually declaring
an initcall.
> how/where to initialize the lock in a race free manner?
Step 0: Figure out how once-at-boot code could *possibly* be called
a second time. What are you worried about racing here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171010/35645399/attachment.bin
prev parent reply other threads:[~2017-10-10 7:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 23:17 boot time variable Tobin C. Harding
2017-10-10 7:08 ` Greg KH
2017-10-10 10:33 ` Tobin C. Harding
2017-10-10 7:50 ` valdis.kletnieks at vt.edu [this message]
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=39732.1507621809@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@lists.kernelnewbies.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 NNTP newsgroup(s).